/*
 * Copyright (c) 2017, Alliance for Open Media. All rights reserved
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#ifndef MDTX_BASES_H_
#define MDTX_BASES_H_

#ifdef __cplusplus
extern "C" {
#endif

#define MDTX_INTRA_16 1

#if CONFIG_LGT
static const int32_t lgt15_16[256] = {
  // 1.5
  66,    164,  261,   355,   446,  533,   615,  691,   760,   822,   877,
  923,   960,  989,   1008,  1017, 197,   476,  715,   893,   996,   1015,
  949,   802,  588,   324,   33,   -261,  -533, -760,  -923,  -1008, 325,
  738,   980,  996,   781,   385,  -100,  -561, -893,  -1018, -908,  -588,
  -131,  355,  760,   989,   450,  924,   987,  612,   -36,   -668,  -1002,
  -891,  -384, 294,   842,   1015, 737,   131,  -533,  -960,  567,   1012,
  732,   -73,  -825,  -986,  -441, 420,   981,  838,   96,    -716,  -1014,
  -586,  262,  922,   677,   991,  279,   -723, -976,  -218,  765,   956,
  156,   -805, -933,  -94,   842,  906,   31,   -876,  776,   861,   -252,
  -1015, -366, 792,   848,   -275, -1016, -344, 806,   835,   -298,  -1016,
  -321,  821,  863,   632,   -716, -798,  531,  921,   -318,  -995,  87,
  1015,  148,  -981,  -375,  894,  583,   -758, 933,   324,   -983,  -173,
  1009,  19,   -1012, 136,   991,  -288,  -947, 433,   881,   -567,  -794,
  689,   983,  -31,   -967,  544,  678,   -904, -198,  1009,  -338,  -830,
  779,   416,  -1000, 115,   939,  -613,  1007, -391,  -660,  977,   -208,
  -793,  912,  -17,   -897,  813,  175,   -968, 685,   360,   -1005, 532,
  997,   -709, -139,  877,   -923, 240,   632,  -1005, 585,   297,   -945,
  847,   -81,  -749,  988,   -447, 940,   -929, 442,   272,   -846,  987,
  -622,  -62,  714,   -1000, 774,  -152,  -548, 968,   -891,  358,   821,
  -993,  877,  -507,  -11,   525,  -887,  992,  -809,  391,   141,   -631,
  939,   -974, 726,   -268,  623,  -854,  974,  -969,  839,   -600,  284,
  69,    -413, 704,   -903,  986,  -942,  776,  -510,  178,   340,   -500,
  643,   -765, 863,   -933,  972,  -981,  958,  -903,  820,   -711,  578,
  -427,  262,  -88,
};
#else
static const int32_t dst7_16[256] = {
  96,    191,   284,  375,  462,  545,   624,   696,   762,  822,  874,  917,
  953,   980,   998,  1007, 284,  545,   762,   917,   998,  998,  917,  762,
  545,   284,   0,    -284, -545, -762,  -917,  -998,  462,  822,  998,  953,
  696,   284,   -191, -624, -917, -1007, -874,  -545,  -96,  375,  762,  980,
  624,   980,   917,  462,  -191, -762,  -1007, -822,  -284, 375,  874,  998,
  696,   96,    -545, -953, 762,  998,   545,   -284,  -917, -917, -284, 545,
  998,   762,   0,    -762, -998, -545,  284,   917,   874,  874,  0,    -874,
  -874,  0,     874,  874,  0,    -874,  -874,  0,     874,  874,  0,    -874,
  953,   624,   -545, -980, -96,  917,   696,   -462,  -998, -191, 874,  762,
  -375,  -1007, -284, 822,  998,  284,   -917,  -545,  762,  762,  -545, -917,
  284,   998,   0,    -998, -284, 917,   545,   -762,  1007, -96,  -998, 191,
  980,   -284,  -953, 375,  917,  -462,  -874,  545,   822,  -624, -762, 696,
  980,   -462,  -762, 822,  375,  -998,  96,    953,   -545, -696, 874,  284,
  -1007, 191,   917,  -624, 917,  -762,  -284,  998,   -545, -545, 998,  -284,
  -762,  917,   0,    -917, 762,  284,   -998,  545,   822,  -953, 284,  624,
  -1007, 545,   375,  -980, 762,  96,    -874,  917,   -191, -696, 998,  -462,
  696,   -1007, 762,  -96,  -624, 998,   -822,  191,   545,  -980, 874,  -284,
  -462,  953,   -917, 375,  545,  -917,  998,   -762,  284,  284,  -762, 998,
  -917,  545,   0,    -545, 917,  -998,  762,   -284,  375,  -696, 917,  -1007,
  953,   -762,  462,  -96,  -284, 624,   -874,  998,   -980, 822,  -545, 191,
  191,   -375,  545,  -696, 822,  -917,  980,   -1007, 998,  -953, 874,  -762,
  624,   -462,  284,  -96
};
#endif  // CONFIG_LGT

#if CONFIG_LGT
// Quantized with 2^10 and scale factor 1.4142135623730951
static const int32_t lgt_klt4_inter[16] = {
  -25, 17,   668,  1284, -60,  370,  1238, -651,
  505, 1317, -293, 145,  1356, -474, 176,  -59,
};

// Quantized with 2^10 and scale factor 2
static const int32_t lgt_klt8_inter[64] = {
  33,   35,   28,    89,   402,   1017, 1404, 1009, 0,    -34,  -10,
  415,  1185, 1090,  -330, -1148, 0,    1,    365,  1211, 968,  -680,
  -549, 947,  -63,   -466, -1272, -935, 652,  158,  -719, 717,  911,
  1374, 590,  -619,  89,   414,   -639, 399,  1342, 295,  -945, 276,
  338,  -724, 709,   -443, 1030,  -859, -116, 707,  -894, 807,  -587,
  295,  705,  -1124, 1091, -845,  587,  -370, 204,  -85,
};

// Quantized with 2^10 and scale factor 2.8284271247461903
static const int32_t lgt_klt16_inter[256] = {
  325,   377,   419,  468,   526,  597,   684,   785,   860,   910,   951,
  968,   947,   878,  765,   607,  348,   430,   500,   576,   656,   731,
  794,   815,   713,  441,   32,   -462,  -912,  -1174, -1159, -879,  627,
  744,   781,   778,  711,   557,  293,   -87,   -521,  -926,  -1138, -963,
  -356,  433,   929,  888,   634,  743,   725,   625,   417,   84,    -389,
  -887,  -1030, -581, 296,   1047, 999,   83,    -866,  -1031, 547,   605,
  487,   245,   -88,  -475,  -829, -864,  -237,  803,   1170,  204,   -1103,
  -1018, 352,   1127, 825,   836,  515,   -13,   -620,  -1048, -878,  41,
  985,   797,   -430, -942,  146,  969,   63,    -921,  739,   660,   180,
  -436,  -919,  -797, 167,   1068, 458,   -946,  -655,  853,   538,   -950,
  -441,  942,   945,  643,   -293, -1091, -910,  308,   1161,  272,   -957,
  -265,  865,   -49,  -786,  474,  575,   -741,  977,   297,   -853,  -1024,
  160,   1054,  135,  -967,  73,   888,   -522,  -560,  884,   -164,  -831,
  776,   1055,  -136, -1213, -270, 1092,  292,   -1005, 64,    828,   -660,
  -217,  833,   -586, -213,  861,  -655,  951,   -596,  -952,  721,   666,
  -934,  -115,  933,  -714,  -208, 876,   -794,  117,   592,   -927,  573,
  858,   -899,  -368, 1040,  -391, -668,  960,   -363,  -451,  914,   -768,
  176,   496,   -929, 966,   -521, 672,   -948,  171,   719,   -927,  341,
  441,   -903,  848,  -399,  -200, 720,   -1025, 1055,  -858,  412,   531,
  -912,  601,   97,   -681,  760,  -391,  -170,  673,   -1016, 1145,  -1099,
  942,   -721,  478,  -204,  549,  -1012, 892,   -345,  -384,  947,   -1202,
  1186,  -1021, 792,  -583,  397,  -248,  139,   -69,   20,    452,   -1009,
  1334,  -1426, 1286, -1010, 681,  -398,  198,   -73,   -5,    48,    -64,
  60,    -49,   24,
};
#else
// These split inter mode TXs do not produce significant performance
// improvements.  They have been left in this code in case someone else wants to
// pick up this idea later on.  Current best results are had with CONFIG_LGT=1
// and CONFIG_MODE_DEP_INTER_TX=1

// Quantized with 2^10
static const int32_t single_klt16_inter[256] = {
  344,   390,   432,   480,  535,   600,   677,  761,  830,  886,   934,  964,
  954,   892,   789,   640,  -444,  -536,  -607, -674, -730, -769,  -778, -731,
  -602,  -356,  -4,    420,  824,   1104,  1158, 956,  -696, -794,  -808, -764,
  -644,  -437,  -146,  228,  602,   917,   1065, 906,  368,  -386,  -936, -1020,
  -724,  -770,  -676,  -484, -210,  141,   532,  862,  916,  546,   -194, -972,
  -1126, -353,  736,   1198, 734,   702,   456,  114,  -293, -674,  -881, -724,
  -87,   769,   1122,  362,  -888,  -1122, 70,   1120, -856, -712,  -278, 264,
  734,   926,   602,   -238, -974,  -802,  357,  1082, 145,  -1062, -380, 1002,
  792,   544,   -39,   -589, -864,  -588,  290,  1052, 564,  -794,  -946, 582,
  876,   -724,  -732,  908,  964,   402,   -484, -978, -674, 347,   1095, 414,
  -908,  -636,  826,   403,  -933,  116,   852,  -692, -912, -136,  818,  888,
  -108,  -1002, -412,  901,  420,   -968,  8,    935,  -668, -350,  1038, -672,
  -922,  224,   1050,  305,  -916,  -620,  813,  542,  -940, 16,    856,  -782,
  12,    768,   -1004, 536,  826,   -518,  -920, 402,  932,  -434,  -794, 784,
  172,   -910,  780,   -58,  -678,  1051,  -954, 433,  734,  -737,  -562, 857,
  316,   -964,  281,   692,  -977,  490,   271,  -861, 1077, -978,  682,  -280,
  -646,  890,   124,   -956, 480,   556,   -921, 473,  289,  -898,  1138, -1084,
  872,   -606,  363,   -136, 622,   -1019, 337,  657,  -906, 242,   612,  -1143,
  1256,  -1080, 804,   -552, 350,   -187,  80,   -24,  619,  -1260, 1065, -152,
  -832,  1316,  -1251, 914,  -566,  298,   -146, 62,   -18,  -8,    5,    1,
  -389,  988,   -1415, 1534, -1314, 916,   -520, 242,  -93,  20,    14,   -28,
  26,    -14,   12,    -7
};
// Quantized with 2^10
static const int32_t single_klt4_inter[16] = { -14,  35,   672, 1282, -52,  384,
                                               1232, -656, 447, 1332, -323, 138,
                                               1376, -418, 158, -56 };
// Quantized with 2^10
static const int32_t single_klt8_inter[64] = {
  48,   54,    60,    134,   410,  964,  1372, 1090, -16,  1,    -35,
  -431, -1156, -1124, 258,   1159, 46,   70,   402,  1177, 964,  -680,
  -662, 900,   220,   586,   1214, 883,  -647, -259, 759,  -698, 938,
  1264, 520,   -702,  -13,   514,  -720, 412,  1263, 346,  -984, 66,
  520,  -787,  684,   -386,  1052, -807, -336, 851,  -908, 714,  -471,
  212,  -747,  1215,  -1096, 777,  -498, 286,  -146, 58
};
// Quantized with 2^10
static const int32_t comp_klt16_inter[256] = {
  420,   444,   465,   485,   518,   548,   590,   644,  687,   734,   808,
  902,   970,   1007,  996,   896,   -500,  -557,  -573, -582,  -596,  -622,
  -656,  -664,  -640,  -540,  -402,  -128,  253,   876,  1366,  1404,  428,
  502,   490,   461,   424,   379,   328,   244,   92,   -124,  -460,  -856,
  -1299, -1030, 226,   1801,  515,   440,   442,   414,  380,   294,   188,
  -6,    -144,  -392,  -712,  -1177, -459,  950,   1479, -1390, -535,  -606,
  -500,  -420,  -292,  -143,  110,   292,   593,   662,  1094,  157,   -868,
  -1224, 1584,  -576,  -554,  -510,  -465,  -304,  -198, 83,    184,   605,
  542,   1034,  54,    -545,  -1410, 1654,  -796,  218,  501,   441,   346,
  237,   -18,   -41,   -470,  -364,  -1035, -40,   70,   1918,  -1566, 379,
  130,   -198,  526,   432,   334,   42,    24,    -461, -218,  -1120, -162,
  -360,  2204,  -972,  -216,  396,   -334,  134,   697,  509,   176,   3,
  -461,  -326,  -1057, -205,  -682,  2222,  -374,  -542, 431,   -318,  110,
  -8,    1199,  224,   100,   -569,  -304,  -1096, -266, -630,  2036,  -176,
  -647,  394,   -227,  74,    -1,    -9,    1022,  290,  -327,  -284,  -979,
  -244,  -747,  2115,  -300,  -823,  462,   -196,  48,   45,    -40,   18,
  1592,  -1178, -337,  -1042, 400,   -87,   1488,  -116, -888,  268,   -38,
  -18,   60,    -43,   -45,   47,    -813,  1370,  656,  -624,  -853,  -1259,
  1558,  258,   -430,  146,   -119,  26,    11,    14,   47,    -37,   322,
  1168,  -1456, -328,  -1138, 1612,  471,   -740,  169,  -43,   -33,   39,
  -6,    -14,   10,    6,     321,   -290,  -1234, 2196, -468,  -1076, 676,
  -76,   -78,   92,    -48,   20,    -2,    -4,    -6,   6,     -152,  1150,
  -1542, -546,  1910,  -718,  -292,  296,   -158,  42,   11,    12,    -15,
  -16,   18,    -13
};

// Quantized with 2^10
static const int32_t comp_klt4_inter[16] = { -108, -28,  782, 1214, -110, 589,
                                             1110, -711, 414, 1278, -421, 338,
                                             1379, -340, 276, -64 };

// Quantized with 2^10
static const int32_t comp_klt8_inter[64] = {
  16,   30,   26,    -50,  -50,  533,  1436, 1358, 20,   12,   -69,  -72,  636,
  1516, 506,  -1108, 28,   -51,  -102, 664,  1540, 248,  -793, 824,  -40,  -130,
  436,  1430, 329,   -794, 918,  -600, -124, 348,  1405, 694,  -756, 795,  -576,
  260,  878,  1506,  596,  -545, 539,  -400, 204,  -115, 1574, 2,    -817, 750,
  -586, 328,  -178,  62,   -963, 1336, -996, 598,  -322, 150,  -58,  13
};
#endif  // CONFIG_LGT

static const int32_t mdt4_mode0[16] = { -260, -168, 696,  1231, -308, 699,
                                        1084, -582, 1080, 884,  -58,  382,
                                        876,  -894, 659,  -310 };

static const int32_t mdt4_mode1[16] = { -118, -56,  751, 1231, -336, 442,
                                        1136, -705, 948, 1082, -39,  165,
                                        1036, -854, 490, -238 };

static const int32_t mdt4_mode2[16] = { -133, -83,  680, 1269, -338, 400,
                                        1186, -644, 864, 1146, -40,  186,
                                        1104, -785, 476, -190 };

static const int32_t mdt4_mode3[16] = { -169, -31,  732,  1238, -270, 736,
                                        1040, -633, 1100, 885,  -173, 274,
                                        887,  -878, 671,  -297 };

static const int32_t mdt4_mode4[16] = { -146, -139, 616, 1295, -284, 573,
                                        1184, -534, 776, 1158, -230, 320,
                                        1181, -640, 512, -180 };

static const int32_t mdt4_mode5[16] = { -152, -138, 615, 1295, -336, 508,
                                        1192, -552, 862, 1126, -110, 273,
                                        1104, -744, 534, -202 };

static const int32_t mdt4_mode6[16] = { -166, -212, 550, 1312, -415, 464,
                                        1214, -486, 944, 1062, 28,   279,
                                        1004, -841, 566, -247 };

static const int32_t mdt4_mode7[16] = { -144, -74,  624,  1296, -456, 436,
                                        1164, -586, 1066, 966,  116,  118,
                                        855,  -984, 582,  -242 };

static const int32_t mdt4_mode8[16] = { -194, -125, 651,  1273, -392, 634,
                                        1106, -564, 1066, 942,  -25,  268,
                                        877,  -890, 670,  -296 };

static const int32_t mdt4_mode9[16] = { 743,   1118, 246, -484, 686, -354,
                                        -1172, -359, 764, 10,   67,  1229,
                                        702,   -849, 812, -474 };

static const int32_t mdt4_mode10[16] = { -266, -205, 722,  1210, -237, 793,
                                         1054, -548, 1072, 842,  -150, 468,
                                         907,  -848, 664,  -341 };

static const int32_t mdt4_mode11[16] = { -310, -281, 648,  1225, -280, 774,
                                         1094, -472, 1020, 873,  -128, 527,
                                         939,  -810, 682,  -308 };

static const int32_t mdt4_mode12[16] = { -144, -120,  642,  1284, -325, 312,
                                         1228, -622,  1091, 932,  126,  147,
                                         884,  -1056, 400,  -200 };

static const int32_t mdt8_mode0[64] = {
  12,   -17,  50,   393,  791,  1038, 1161, 993,  -34,   -182, 25,   886,  1296,
  437,  -745, -974, -156, -180, 610,  1236, 50,   -1144, -254, 929,  -259, 262,
  1341, 533,  -752, 379,  698,  -884, 920,  1554, 619,   -252, 329,  86,   -512,
  332,  1279, 134,  -781, 650,  -101, -589, 899,  -585,  1084, -872, 192,  340,
  -777, 898,  -744, 378,  668,  -930, 996,  -916, 774,   -562, 343,  -142
};

static const int32_t mdt8_mode1[64] = {
  35,   36,    -4,    82,   420,   806,   1266, 1326, 67,   11,    -147,
  198,  1162,  1263,  -68,  -1086, -126,  68,   172,  -921, -1200, 632,
  900,  -804,  -113,  404,  -330,  -1526, 262,  456,  -952, 633,   524,
  -426, -1620, -424,  312,  -633,  602,   -270, 1784, 954,  204,   108,
  -196, 80,    -68,   -1,   596,   -1354, -312, 344,  -736, 834,   -656,
  351,  590,   -1050, 1126, -814,  694,   -490, 276,  -120
};

static const int32_t mdt8_mode2[64] = {
  8,    48,    -23,   2,   312,   754,  1292,  1363, 78,    54,    -148,
  -22,  828,   1353,  318, -1244, -50,  71,    216,  -473,  -1465, -11,
  1120, -718,  100,   214, 80,    -941, -740,  1154, -1047, 518,   466,
  230,  -1074, -1440, 520, -600,  249,  -50,   1373, 1409,  394,   402,
  -32,  -82,   15,    -13, 860,   -685, -1356, 812,  -624,  298,   -90,
  58,   1156,  -1277, 986, -437,  234,  -81,   58,   -8
};

static const int32_t mdt8_mode3[64] = {
  32,   12,   30,   230,  594,   982,   1224, 1150, 30,   -150, -94,
  673,  1364, 794,  -492, -990,  -110,  -269, 348,  1262, 468,  -1042,
  -494, 919,  346,  -284, -1462, -753,  610,  -176, -635, 694,  938,
  1554, 571,  -260, 328,  69,    -532,  333,  1462, -80,  -626, 680,
  -229, -462, 814,  -514, 918,   -1009, 544,  74,   -648, 886,  -817,
  402,  448,  -761, 954,  -996,  900,   -692, 438,  -172
};

static const int32_t mdt8_mode4[64] = {
  18,   -19,  -82,   25,   398, 916,  1280,  1244, 34,   -154, -302, 354,  1298,
  1080, -204, -1030, 188,  368, -338, -1368, -804, 712,  514,  -787, -340, 328,
  1469, 760,  -487,  294,  682, -670, 810,   1569, 541,  -250, 473,  130,  -572,
  394,  1427, 100,   -612, 750, -152, -552,  818,  -463, 1026, -908, 466,  168,
  -688, 924,  -790,  350,  547, -794, 970,   -983, 866,  -648, 406,  -154
};

static const int32_t mdt8_mode5[64] = {
  0,    -44,  104,  482,  770,   954,  1133, 1078, -46,  -142, 151,
  925,  1214, 498,  -625, -1086, -112, -154, 652,  1217, 6,    -1186,
  -384, 836,  -222, 190,  1279,  444,  -907, 306,  836,  -814, 151,
  1255, 1008, -555, 280,  446,   -858, 509,  1448, 1003, -384, 359,
  170,  -550, 600,  -348, 1251,  -790, 102,  366,  -764, 849,  -681,
  304,  667,  -952, 962,  -926,  783,  -561, 338,  -134
};

static const int32_t mdt8_mode6[64] = {
  21,   26,   -9,   -138, -164,  458,   1306, 1493, 66,    -17,   -331,
  -318, 764,  1530, 529,  -880,  38,    218,  72,   -1042, -1499, -51,
  538,  -720, 354,  -144, -1383, -1146, 217,  -114, -684,  542,   426,
  1396, 891,  -506, 121,  525,   -737,  426,  1417, 780,   -535,  506,
  216,  -622, 682,  -372, 1112,  -798,  50,   610,  -872,  865,   -618,
  234,  798,  -965, 1042, -890,  683,   -468, 244,  -66
};

static const int32_t mdt8_mode7[64] = {
  48,   -1,    -22,   63,   285,   639,   1206, 1498, -8,    -88,  -110,
  427,  1242,  1252,  168,  -925,  24,    176,  -120, -1066, -988, 600,
  996,  -826,  136,   91,   -852,  -1281, 354,  564,  -1024, 553,  330,
  -424, -1390, -76,   566,  -1006, 738,   -300, 1462, 1358,  264,  -30,
  290,  -212,  80,    -70,  1247,  -960,  -398, 653,  -820,  598,  -316,
  80,   608,   -1096, 1132, -892,  628,   -354, 150,  -56
};

static const int32_t mdt8_mode8[64] = {
  20,   -10,  44,   301,  671,   1020,  1206, 1075, -12,  -156, -34,
  746,  1332, 674,  -588, -1020, -132,  -244, 414,  1259, 354,  -1102,
  -415, 920,  -333, 176,  1362,  724,   -731, 193,  709,  -774, 945,
  1546, 688,  -198, 288,  87,    -471,  290,  1444, -78,  -720, 648,
  -178, -476, 802,  -515, 945,   -1038, 499,  102,  -636, 862,  -806,
  409,  441,  -776, 962,  -984,  890,   -687, 454,  -192
};

static const int32_t mdt8_mode9[64] = {
  -48,  54,   474,   938,  1128, 1001, 749,  498,  -225, 3,     976,
  1242, 40,   -1004, -776, -192, 9,    749,  1112, -224, -1122, -28,
  882,  556,  496,   1196, 526,  -368, 367,  635,  -596, -1101, 1146,
  873,  -510, 62,    461,  -706, -194, 1052, 1154, -277, -392,  838,
  -524, -108, 860,   -950, 1000, -916, 570,  -58,  -483, 826,   -900,
  551,  502,  -723,  874,  -938, 898,  -766, 556,  -272
};

static const int32_t mdt8_mode10[64] = {
  -28,  94,   624,   1116,  1132, 844,  614,  422,  -188, 171,   1090,
  1020, -371, -1152, -649,  -118, 45,   737,  953,  -475, -1070, 298,
  1035, 456,  376,   1130,  506,  -417, 406,  620,  -747, -1114, 1130,
  970,  -468, -27,   418,   -658, -166, 1059, 1235, -218, -376,  764,
  -470, -103, 791,   -1020, 988,  -910, 562,  -45,  -483, 810,   -921,
  577,  485,  -722,  881,   -960, 914,  -762, 514,  -246
};

static const int32_t mdt8_mode11[64] = {
  -33,  21,   495,   988,  1112, 963,  784,  440,  -134, 138,   1038,
  1183, -6,   -1012, -782, -212, -74,  442,  972,  -185, -1204, -94,
  1050, 674,  162,   1017, 795,  -504, 46,   868,  -364, -1166, 931,
  1236, -198, -280,  555,  -407, -382, 1032, 1386, 46,   -466,  672,
  -306, -310, 808,   -872, 1046, -872, 436,  95,   -578, 868,   -875,
  538,  514,  -810,  922,  -996, 877,  -682, 408,  -176
};

static const int32_t mdt8_mode12[64] = {
  13,    22,    -14,   176,  592,   797,   1186,  1330, 26,    0,    -94,
  424,   1299,  1030,  -162, -1108, 48,    -40,   -115, 746,   1004, -790,
  -1088, 898,   -73,   172,  -278,  -1342, 39,    912,  -1064, 559,  -255,
  -316,  -1116, -966,  796,  -878,  618,   -255,  -816, -1489, -716, 528,
  -497,  452,   -235,  116,  1388,  265,   -1320, 444,  -444,  238,  -66,
  24,    1237,  -1332, 770,  -467,  264,   -94,   17,   4
};

#if MDTX_INTRA_16
#if CONFIG_LGT
// intra mode dependent transforms, trained with LGT
static const int32_t mdt16_mode0[256] = {
  169,   276,   360,   451,   550,   637,   710,   774,   825,   871,   909,
  920,   914,   899,   868,   796,   349,   592,   769,   888,   949,   934,
  847,   673,   430,   148,   -156,  -459,  -717,  -905,  -995,  -911,  470,
  794,   958,   918,   676,   262,   -226,  -695,  -983,  -1011, -830,  -458,
  31,    536,   879,   877,   441,   784,   868,   543,   -68,   -679,  -1040,
  -926,  -353,  397,   978,   1075,  644,   -117,  -752,  -859,  569,   899,
  699,   -35,   -841,  -1096, -561,  420,   1045,  822,   -4,    -806,  -977,
  -363,  459,   808,   589,   821,   377,   -545,  -1040, -443,  677,   1026,
  165,   -885,  -933,  132,   1063,  742,   -304,  -818,  785,   835,   -128,
  -1073, -652,  643,   967,   -184,  -1043, -281,  873,   660,   -549,  -919,
  -9,    768,   -1012, -656,  679,   952,   -348,  -893,  256,   921,   -172,
  -943,  50,    953,   30,    -1010, -286,  897,   1069,  249,   -1013, -281,
  955,   67,    -951,  167,   881,   -453,  -801,  675,   622,   -847,  -564,
  854,   1137,  -255,  -936,  584,   574,   -923,  -98,   953,   -457,  -684,
  856,   193,   -908,  381,   807,   -803,  1063,  -669,  -511,  942,   -320,
  -645,  877,   -187,  -746,  885,   -26,   -862,  778,   122,   -1027, 762,
  951,   -969,  168,   703,   -976,  417,   463,   -950,  686,   128,   -810,
  851,   -174,  -645,  1046,  -610,  771,   -1066, 744,   -65,   -647,  988,
  -762,  137,   550,   -955,  808,   -252,  -457,  918,   -948,  476,   535,
  -917,  1003,  -772,  297,   260,   -727,  930,   -818,  440,   118,   -651,
  995,   -1037, 795,   -336,  391,   -751,  991,   -1090, 1030,  -840,  526,
  -152,  -234,  577,   -814,  924,   -886,  711,   -461,  174,   97,    -231,
  393,   -561,  726,   -881,  989,   -1051, 1076,  -1043, 948,   -810,  639,
  -442,  249,   -82,
};

static const int32_t mdt16_mode1[256] = {
  160,   258,   349,   442,   524,   595,   661,   760,   830,   887,   911,
  932,   934,   913,   880,   824,   319,   535,   733,   895,   944,   930,
  887,   747,   469,   203,   -112,  -445,  -718,  -894,  -987,  -896,  400,
  745,   939,   938,   765,   401,   -127,  -729,  -1104, -1080, -730,  -352,
  46,    450,   806,   852,   356,   685,   749,   472,   49,    -440,  -930,
  -1084, -503,  428,   1093,  1131,  612,   -177,  -816,  -889,  571,   942,
  820,   155,   -605,  -1034, -918,  95,    1098,  938,   -164,  -861,  -807,
  -218,  442,   666,   793,   1148,  488,   -711,  -1145, -423,  723,   977,
  -38,   -914,  -632,  316,   846,   484,   -302,  -594,  349,   560,   40,
  -802,  -675,  402,   913,   -120,  -983,  33,    1171,  411,   -985,  -1128,
  211,   1025,  1092,  797,   -868,  -1167, 440,   1153,  -117,  -950,  97,
  755,   -110,  -721,  16,    741,   139,   -571,  895,   264,   -915,  -262,
  877,   53,    -890,  309,   706,   -659,  -596,  973,   425,   -1168, -471,
  975,   1324,  -239,  -991,  685,   519,   -1003, -86,   848,   -537,  -416,
  859,   -19,   -839,  491,   687,   -716,  1098,  -670,  -411,  845,   -426,
  -502,  868,   -357,  -567,  899,   -286,  -762,  1004,  -140,  -999,  847,
  994,   -987,  287,   546,   -982,  561,   382,   -916,  752,   -78,   -707,
  964,   -382,  -468,  1002,  -641,  731,   -988,  742,   -211,  -447,  830,
  -702,  155,   488,   -932,  870,   -307,  -483,  1002,  -1138, 621,   536,
  -900,  963,   -721,  194,   442,   -880,  988,   -859,  479,   58,    -583,
  920,   -933,  810,   -420,  -230,  457,   -608,  676,   -602,  375,   -49,
  -352,  785,   -1050, 1187,  -1186, 1055,  -812,  552,   -248,  290,   -557,
  840,   -1087, 1234,  -1216, 1051,  -872,  747,   -553,  406,   -305,  234,
  -198,  143,   -58,
};

static const int32_t mdt16_mode2[256] = {
  171,   258,   339,  423,   527,  628,   690,   782,   841,   882,   915,
  928,   921,   901,  864,   806,  333,   532,   717,   864,   924,   932,
  876,   691,   480,  215,   -104, -422,  -691,  -907,  -1036, -963,  493,
  775,   957,   954,  720,   329,  -88,   -603,  -956,  -1037, -868,  -472,
  2,     466,   849,  904,   466,  758,   831,   574,   41,    -589,  -1076,
  -968,  -404,  299,  916,   1084, 715,   -21,   -724,  -911,  675,   933,
  684,   16,    -782, -1056, -635, 309,   946,   846,   165,   -717,  -1062,
  -469,  456,   813,  574,   731,  412,   -344,  -1072, -659,  637,   1083,
  281,   -783,  -974, 4,     1011, 810,   -287,  -819,  801,   820,   -71,
  -1065, -793,  627,  1118,  -166, -1097, -305,  798,   711,   -373,  -842,
  -70,   588,   995,  630,   -602, -983,  280,   970,   -233,  -898,  162,
  898,   -131,  -984, -9,    1050, 313,   -881,  1135,  249,   -1009, -399,
  905,   142,   -918, 229,   863,  -549,  -750,  655,   603,   -811,  -605,
  838,   1091,  -267, -974,  516,  627,   -825,  -54,   871,   -468,  -680,
  843,   251,   -954, 364,   904,  -873,  1151,  -827,  -570,  1023,  -280,
  -677,  872,   -351, -617,  898,  -19,   -774,  693,   88,    -915,  691,
  761,   -918,  196,  627,   -904, 446,   362,   -940,  772,   101,   -882,
  930,   -162,  -706, 1137,  -663, 727,   -1081, 714,   41,    -757,  1004,
  -701,  147,   487,  -942,  754,  -140,  -602,  984,   -920,  442,   521,
  -895,  918,   -603, 122,   369,  -789,  990,   -806,  335,   232,   -771,
  1077,  -1047, 764,  -328,  305,  -576,  723,   -707,  555,   -289,  -102,
  485,   -832,  1099, -1199, 1150, -973,  695,   -432,  164,   307,   -656,
  970,   -1129, 1126, -1096, 1004, -917,  809,   -620,  455,   -264,  119,
  -46,   25,    -10,
};

static const int32_t mdt16_mode3[256] = {
  169,   263,   368,   461,   539,  620,  698,  763,   827,   889,   907,
  903,   913,   914,   877,   805,  457,  662,  831,   947,   995,   943,
  812,   617,   379,   75,    -201, -466, -707, -856,  -921,  -863,  609,
  872,   1013,  871,   503,   48,   -389, -764, -994,  -977,  -730,  -316,
  98,    533,   896,   898,   591,  833,  730,  303,   -215,  -714,  -1001,
  -805,  -210,  490,   1012,  1087, 647,  -123, -832,  -949,  859,   1036,
  540,   -390,  -1124, -1061, -230, 719,  1057, 586,   -209,  -760,  -738,
  -231,  363,   604,   567,   681,  53,   -833, -902,  126,   1105,  822,
  -380,  -1120, -657,  457,   1056, 585,  -345, -751,  936,   638,   -599,
  -1076, -112,  956,   608,   -624, -877, 136,  955,   431,   -751,  -889,
  123,   805,   1071,  373,   -973, -679, 764,  697,   -661,  -673,  602,
  680,   -580,  -847,  324,   1029, 151,  -818, 800,   -46,   -945,  99,
  940,   -388,  -842,  677,   728,  -891, -572, 945,   465,   -943,  -482,
  871,   -1113, 536,   827,   -802, -280, 973,  -251,  -790,  685,   426,
  -958,  77,    841,   -563,  -723, 838,  1028, -855,  -289,  890,   -520,
  -363,  852,   -442,  -493,  903,  -330, -683, 927,   -69,   -1085, 852,
  -863,  1102,  -398,  -470,  970,  -650, -153, 859,   -923,  197,   662,
  -959,  334,   507,   -971,  603,  553,  -907, 774,   -293,  -419,  913,
  -852,  333,   384,   -949,  947,  -415, -410, 985,   -1074, 566,   517,
  -908,  1006,  -851,  371,   227,  -749, 1045, -994,  661,   -128,  -392,
  793,   -918,  735,   -332,  276,  -605, 854,  -1027, 1037,  -920,  650,
  -275,  -116,  485,   -780,  962,  -984, 810,  -536,  213,   131,   -307,
  492,   -656,  756,   -825,  881,  -931, 946,  -957,  964,   -920,  799,
  -582,  357,   -132,
};

static const int32_t mdt16_mode4[256] = {
  174,   248,   335,   440,   546,  624,   712,   801,   858,   874,   917,
  933,   927,   900,   838,   757,  339,   535,   690,   792,   882,   905,
  855,   734,   518,   242,   -77,  -463,  -798,  -985,  -1019, -908,  444,
  701,   889,   919,   774,   461,  9,     -498,  -920,  -1106, -964,  -536,
  33,    545,   847,   840,   501,  852,   992,   683,   30,    -648,  -1020,
  -922,  -451,  236,   837,   1045, 671,   -76,   -693,  -813,  721,   958,
  699,   -60,   -832,  -1032, -546, 270,   890,   805,   45,    -800,  -994,
  -330,  544,   927,   539,   715,  375,   -503,  -1040, -484,  608,   1075,
  368,   -816,  -1029, 58,    1044, 724,   -318,  -879,  827,   786,   -150,
  -1047, -682,  608,   1036,  -93,  -1089, -453,  791,   806,   -383,  -866,
  -47,   698,   1062,  602,   -661, -904,  296,   893,   -142,  -922,  -11,
  908,   65,    -894,  -68,   1045, 348,   -1021, 1166,  205,   -1099, -301,
  1014,  66,    -976,  130,   872,  -379,  -774,  571,   602,   -760,  -553,
  782,   -1011, 316,   888,   -651, -522,  991,   58,    -985,  434,   760,
  -837,  -218,  920,   -385,  -815, 808,   1057,  -774,  -472,  991,   -376,
  -612,  901,   -184,  -745,  837,  -14,   -833,  762,   155,   -1026, 708,
  863,   -1021, 202,   683,   -902, 411,   420,   -934,  679,   155,   -865,
  929,   -225,  -663,  1058,  -598, -712,  1050,  -725,  80,    636,   -974,
  728,   -52,   -630,  1010,  -824, 203,   512,   -941,  939,   -444,  519,
  -914,  934,   -663,  173,   368,  -823,  1005,  -826,  377,   199,   -691,
  993,   -1028, 792,   -324,  340,  -705,  913,   -976,  864,   -592,  204,
  218,   -573,  827,   -984,  1022, -953,  768,   -493,  186,   197,   -445,
  666,   -851,  974,   -1057, 1075, -1034, 922,   -808,  697,   -583,  463,
  -330,  192,   -72,
};

static const int32_t mdt16_mode5[256] = {
  155,   254,  333,   421,   537,  630,   708,   766,   810,   864,   899,
  907,   929,  936,   891,   821,  244,   476,   685,   810,   899,   943,
  908,   768,  550,   268,   -86,  -474,  -757,  -913,  -1002, -920,  403,
  690,   935,  980,   798,   461,  -40,   -623,  -986,  -1083, -920,  -495,
  46,    513,  765,   768,   551,  916,   925,   528,   32,    -531,  -992,
  -953,  -401, 374,   965,   1037, 581,   -93,   -710,  -882,  675,   1019,
  802,   4,    -850,  -1111, -528, 460,   970,   635,   -139,  -797,  -886,
  -273,  518,  824,   661,   814,  220,   -641,  -900,  -273,  687,   1000,
  157,   -987, -933,  266,   1106, 666,   -382,  -848,  780,   789,   -192,
  -1037, -565, 693,   989,   -213, -1045, -243,  843,   584,   -575,  -954,
  -20,   882,  963,   599,   -714, -922,  344,   880,   -192,  -871,  133,
  957,   -57,  -1042, -139,  1033, 389,   -892,  -1220, -136,  1159,  150,
  -1182, -1,   1034,  -250,  -815, 504,   568,   -632,  -352,  753,   401,
  -704,  930,  -319,  -731,  675,  371,   -919,  124,   925,   -633,  -659,
  983,   108,  -1018, 533,   831,  -869,  -1115, 685,   519,   -1029, 404,
  648,   -881, 266,   630,   -906, 152,   765,   -834,  -59,   976,   -663,
  -963,  1051, -309,  -568,  971,  -561,  -325,  903,   -784,  23,    707,
  -907,  286,  575,   -1020, 609,  -688,  1028,  -778,  186,   552,   -936,
  771,   -215, -423,  875,   -881, 400,   388,   -969,  1064,  -543,  532,
  -883,  957,  -748,  309,   236,  -733,  1028,  -964,  559,   9,     -561,
  923,   -986, 782,   -340,  350,  -722,  978,   -1131, 1111,  -968,  679,
  -283,  -126, 476,   -714,  816,  -814,  684,   -465,  186,   94,    -214,
  353,   -498, 641,   -772,  869,  -953,  1011,  -1045, 1047,  -964,  807,
  -589,  365,  -142,
};

static const int32_t mdt16_mode6[256] = {
  159,   262,   374,  469,   543,   629,  725,  808,   848,   878,   911,
  914,   898,   876,  844,   789,   290,  525,  744,   893,   979,   983,
  869,   658,   401,  88,    -202,  -483, -730, -896,  -976,  -913,  458,
  781,   938,   919,  706,   282,   -262, -720, -1001, -1013, -763,  -384,
  14,    492,   884,  947,   554,   852,  839,  546,   -55,   -681,  -1032,
  -904,  -315,  497,  1026,  1017,  530,  -191, -741,  -841,  540,   931,
  732,   -36,   -876, -1068, -463,  526,  1092, 770,   -171,  -954,  -931,
  -211,  468,   663,  671,   840,   374,  -587, -988,  -296,  753,   939,
  -27,   -1010, -837, 264,   1080,  694,  -309, -837,  826,   879,   -239,
  -1172, -550,  726,  939,   -328,  -946, 20,   888,   419,   -661,  -869,
  29,    795,   1079, 566,   -875,  -825, 647,  851,   -481,  -828,  418,
  856,   -362,  -886, 220,   936,   192,  -783, -1113, -64,   990,   24,
  -885,  302,   808,  -498,  -763,  630,  640,  -844,  -401,  1004,  494,
  -935,  1165,  -421, -847,  692,   377,  -944, 245,   776,   -634,  -457,
  931,   -55,   -924, 497,   825,   -836, -955, 764,   295,   -956,  512,
  470,   -927,  378,  600,   -951,  263,  806,  -854,  -57,   1034,  -790,
  -1002, 1160,  -478, -483,  1102,  -804, -106, 860,   -835,  163,   552,
  -820,  369,   413,  -848,  488,   -644, 943,  -853,  466,   220,   -822,
  978,   -562,  -138, 815,   -1052, 642,  158,  -788,  1001,  -540,  432,
  -838,  1037,  -932, 621,   -146,  -387, 795,  -954,  800,   -311,  -295,
  796,   -1032, 886,  -387,  -248,  583,  -887, 1042,  -1110, 1101,  -970,
  762,   -409,  -17,  375,   -630,  767,  -741, 518,   -197,  -11,   -17,
  88,    -175,  320,  -492,  671,   -870, 1004, -1073, 1112,  -1124, 1059,
  -848,  521,   -173,
};

static const int32_t mdt16_mode7[256] = {
  145,  227,   293,   403,   507,  570,   641,   702,   763,   822,   871,
  930,  968,   978,   973,   928,  409,   619,   772,   905,   976,   945,
  850,  722,   534,   275,   -12,  -309,  -608,  -832,  -962,  -942,  561,
  817,  953,   897,   657,   280,  -190,  -622,  -933,  -1032, -892,  -556,
  -74,  440,   825,   917,   674,  935,   836,   433,   -162,  -777,  -1083,
  -858, -302,  321,   885,   1055, 711,   -20,   -647,  -789,  703,   886,
  567,  -208,  -952,  -1059, -341, 582,   1015,  743,   -15,   -747,  -995,
  -445, 453,   853,   786,   830,  140,   -877,  -1048, -76,   987,   915,
  -84,  -915,  -781,  160,   934,  675,   -248,  -714,  827,   516,   -462,
  -927, -216,  798,   724,   -398, -977,  -210,  967,   770,   -631,  -1126,
  -20,  897,   1087,  439,   -833, -791,  463,   815,   -324,  -923,  195,
  992,  4,     -1002, -178,  1018, 355,   -801,  913,   30,    -1003, -168,
  946,  -16,   -953,  233,   999,  -400,  -1007, 517,   793,   -756,  -621,
  796,  1099,  -459,  -996,  773,  562,   -1036, -22,   987,   -440,  -722,
  739,  221,   -801,  365,   692,  -673,  -962,  853,   301,   -986,  514,
  501,  -921,  319,   669,   -878, 46,    823,   -801,  -60,   1045,  -755,
  -816, 1016,  -280,  -649,  981,  -531,  -281,  858,   -712,  -73,   824,
  -901, 193,   633,   -1117, 667,  657,   -1039, 776,   -149,  -560,  957,
  -820, 206,   562,   -941,  768,  -140,  -573,  978,   -986,  489,   465,
  -816, 873,   -675,  220,   347,  -795,  974,   -788,  307,   325,   -819,
  1069, -1045, 825,   -364,  352,  -709,  904,   -947,  839,   -560,  164,
  267,  -694,  963,   -1069, 1046, -862,  615,   -382,  139,   225,   -508,
  709,  -850,  976,   -1049, 1078, -1065, 983,   -827,  650,   -487,  340,
  -232, 150,   -58,
};

static const int32_t mdt16_mode8[256] = {
  168,   251,  322,   399,  505,  612,   688,   752,   808,   867,  911,
  957,   960,  932,   892,  793,  314,   560,   752,   885,   987,  992,
  917,   736,  444,   121,  -142, -416,  -714,  -897,  -941,  -824, 481,
  749,   893,  879,   685,  350,  -133,  -702,  -1045, -1068, -840, -388,
  74,    553,  902,   843,  673,  929,   898,   513,   -96,   -659, -1008,
  -970,  -323, 543,   994,  909,  471,   -143,  -712,  -800,  694,  894,
  553,   -134, -715,  -851, -458, 373,   978,   777,   -27,   -916, -1105,
  -419,  586,  1030,  621,  798,  402,   -452,  -976,  -533,  449,  1017,
  414,   -766, -1044, -18,  1048, 822,   -298,  -904,  991,   838,  -403,
  -1279, -586, 738,   989,  -81,  -968,  -407,  651,   688,   -317, -758,
  -99,   591,  1085,  342,  -939, -740,  615,   883,   -328,  -837, 284,
  875,   -182, -972,  -31,  996,  283,   -894,  895,   20,    -928, -56,
  1029,  -61,  -1066, 271,  862,  -521,  -784,  719,   680,   -880, -579,
  855,   1091, -415,  -867, 734,  474,   -1034, 18,    989,   -496, -671,
  821,   225,  -878,  322,  783,  -747,  999,   -768,  -421,  982,  -433,
  -576,  990,  -261,  -654, 875,  -180,  -781,  790,   38,    -997, 797,
  777,   -934, 222,   603,  -956, 453,   433,   -960,  780,   73,   -854,
  990,   -282, -662,  1034, -601, 767,   -1155, 821,   -111,  -584, 952,
  -729,  130,  514,   -959, 837,  -270,  -438,  889,   -909,  468,  529,
  -959,  1058, -792,  299,  228,  -665,  927,   -931,  611,   -49,  -511,
  879,   -975, 797,   -370, 265,  -589,  846,   -1000, 977,   -813, 485,
  -109,  -256, 632,   -909, 1016, -1007, 832,   -556,  231,   143,  -312,
  506,   -704, 852,   -955, 1016, -1018, 986,   -938,  847,   -735, 629,
  -467,  284,  -103,
};

static const int32_t mdt16_mode9[256] = {
  146,  237,   323,  402,   498,  598,   678,  760,   824,   884,   925,
  935,  919,   923,  898,   842,  341,   558,  728,   875,   985,   980,
  904,  745,   508,  171,   -182, -470,  -683, -848,  -932,  -876,  479,
  785,  966,   960,  731,   308,  -236,  -746, -1047, -1012, -745,  -351,
  87,   516,   825,  832,   531,  852,   868,  555,   -62,   -766,  -1112,
  -858, -134,  608,  1008,  931,  479,   -225, -748,  -805,  492,   735,
  601,  22,    -683, -1018, -560, 467,   1106, 749,   -217,  -1004, -1036,
  -298, 606,   915,  622,   850,  418,   -451, -997,  -559,  536,   1044,
  247,  -904,  -943, 173,   1072, 737,   -285, -803,  -663,  -839,  -147,
  955,  927,   -507, -1052, 73,   1023,  245,  -917,  -612,  669,   893,
  -17,  -717,  1007, 719,   -639, -1086, 245,  974,   -114,  -969,  127,
  931,  -102,  -934, 34,    940,  252,   -771, 1128,  318,   -1125, -411,
  983,  75,    -797, 183,   721,  -537,  -614, 759,   481,   -986,  -430,
  888,  1121,  -237, -959,  539,  568,   -879, -26,   901,   -578,  -543,
  946,  18,    -925, 514,   784,  -836,  1045, -658,  -509,  932,   -345,
  -649, 939,   -228, -703,  921,  -161,  -807, 865,   -28,   -955,  765,
  988,  -1029, 156,  738,   -996, 497,   323,  -901,  777,   -25,   -724,
  898,  -308,  -489, 987,   -623, 738,   -935, 571,   6,     -610,  982,
  -860, 249,   456,  -889,  821,  -354,  -378, 967,   -1135, 584,   555,
  -950, 1002,  -735, 206,   369,  -800,  982,  -863,  493,   29,    -534,
  914,  -994,  793,  -355,  450,  -853,  1098, -1177, 1113,  -959,  683,
  -358, 11,    291,  -554,  723,  -750,  638,  -446,  180,   68,    -203,
  312,  -368,  446,  -607,  794,  -921,  1042, -1153, 1156,  -1026, 837,
  -618, 398,   -141,
};

static const int32_t mdt16_mode10[256] = {
  147,   251,  354,  453,   536,  621,   695,  765,   836,   887,   922,
  928,   901,  888,  873,   820,  303,   565,  755,   890,   1003,  967,
  863,   737,  454,  110,   -247, -535,  -735, -862,  -905,  -847,  385,
  713,   973,  980,  696,   252,  -285,  -739, -1065, -1049, -743,  -325,
  98,    554,  851,  846,   434,  755,   868,  579,   7,     -635,  -1063,
  -926,  -239, 557,  1088,  1009, 447,   -291, -789,  -824,  371,   709,
  736,   160,  -664, -1154, -702, 399,   1180, 846,   -291,  -1075, -823,
  -62,   555,  648,  815,   1053, 421,   -596, -1086, -457,  696,   962,
  20,    -919, -729, 380,   993,  490,   -342, -647,  917,   1012,  -132,
  -1108, -568, 715,  710,   -425, -807,  222,  974,   110,   -1002, -693,
  285,   730,  1116, 594,   -985, -759,  837,  746,   -651,  -805,  609,
  647,   -611, -661, 485,   804,  23,    -658, -915,  -72,   903,   -77,
  -821,  393,  766,  -606,  -591, 833,   304,  -953,  -125,  1239,  323,
  -1116, 1032, -299, -878,  708,  400,   -898, 71,    829,   -629,  -393,
  984,   -218, -861, 765,   709,  -953,  1158, -792,  -359,  957,   -492,
  -458,  958,  -437, -569,  922,  -267,  -655, 820,   -159,  -907,  787,
  -951,  1033, -350, -498,  912,  -586,  -210, 854,   -899,  222,   624,
  -979,  552,  356,  -1004, 670,  709,   -989, 802,   -309,  -430,  956,
  -940,  424,  309,  -787,  838,  -505,  -226, 900,   -1081, 550,   561,
  -900,  995,  -908, 492,   66,   -572,  895,  -964,  702,   -215,  -294,
  766,   -970, 900,  -428,  268,  -528,  781,  -996,  1082,  -975,  675,
  -301,  -72,  389,  -681,  920,  -1009, 890,  -646,  275,   113,   -286,
  457,   -572, 678,  -782,  907,  -945,  986,  -1068, 1034,  -914,  732,
  -530,  345,  -130,
};

static const int32_t mdt16_mode11[256] = {
  151,   254,   353,  438,  548,   625,  687,   765,   832,   874,   911,  933,
  926,   903,   870,  806,  395,   605,  784,   919,   976,   960,   861,  647,
  405,   136,   -171, -457, -718,  -878, -940,  -884,  512,   833,   1007, 907,
  580,   211,   -272, -767, -1016, -971, -750,  -387,  58,    530,   883,  894,
  490,   779,   850,  496,  -144,  -735, -1079, -927,  -227,  583,   1064, 1016,
  480,   -245,  -717, -794, 627,   798,  580,   -123,  -851,  -971,  -466, 469,
  1098,  854,   -88,  -964, -1044, -246, 575,   740,   830,   958,   295,  -669,
  -1011, -395,  684,  968,  59,    -906, -771,  267,   1059,  615,   -409, -712,
  386,   464,   2,    -647, -640,  283,  960,   101,   -1045, -394,  971,  809,
  -633,  -1292, -43,  1126, 1300,  743,  -923,  -1214, 358,   1135,  -67,  -958,
  -110,  703,   177,  -494, -210,  540,  292,   -528,  863,   108,   -873, -85,
  934,   -61,   -947, 156,  907,   -426, -808,  636,   639,   -982,  -663, 1091,
  1086,  -327,  -955, 659,  654,   -935, -198,  963,   -377,  -756,  768,  317,
  -899,  358,   777,  -736, -986,  668,  506,   -885,  221,   646,   -807, 126,
  805,   -900,  -137, 1058, -791,  -238, 1016,  -696,  948,   -1036, 87,   777,
  -1017, 339,   588,  -911, 578,   205,  -908,  890,   -108,  -615,  914,  -513,
  -677,  971,   -629, -19,  689,   -971, 624,   45,    -673,  1030,  -818, 145,
  574,   -981,  1015, -506, -575,  969,  -952,  651,   -131,  -462,  833,  -864,
  578,   -120,  -358, 795,  -1056, 1038, -822,  379,   316,   -592,  692,  -621,
  386,   -44,   -347, 700,  -983,  1123, -1149, 1073,  -907,  702,   -501, 217,
  -326,  680,   -958, 1136, -1213, 1206, -1090, 905,   -659,  427,   -229, 75,
  40,    -52,   23,   -13,
};

static const int32_t mdt16_mode12[256] = {
  47,   192,   406,  471,  585,  644,   706,   754,   806,   849,   882,
  901,  922,   915,  882,  844,  166,   372,   616,   763,   946,   967,
  921,  799,   497,  229,  -72,  -430,  -715,  -893,  -1037, -1034, 285,
  658,  1097,  1050, 789,  375,  -106,  -565,  -919,  -1056, -933,  -553,
  -20,  426,   697,  818,  366,  816,   1034,  755,   -40,   -665,  -1060,
  -952, -294,  562,  1042, 871,  414,   -129,  -661,  -778,  304,   641,
  775,  145,   -796, -945, -397, 440,   1065,  837,   -18,   -981,  -1152,
  -386, 568,   889,  650,  1040, 602,   -525,  -1140, -451,  632,   894,
  276,  -710,  -899, 163,  1060, 604,   -307,  -739,  1578,  1204,  -646,
  -972, -112,  775,  407,  -236, -745,  -65,   764,   352,   -643,  -512,
  170,  530,   804,  478,  -832, -318,  871,   450,   -939,  -648,  945,
  772,  -720,  -881, 348,  980,  158,   -753,  755,   -61,   -685,  423,
  809,  -635,  -803, 581,  867,  -761,  -609,  931,   463,   -1020, -614,
  962,  516,   -100, -651, 639,  549,   -1052, -173,  1130,  -423,  -717,
  767,  33,    -878, 790,  899,  -1039, 1215,  -770,  -587,  1145,  -390,
  -710, 1092,  -343, -583, 784,  -28,   -744,  526,   296,   -780,  466,
  606,  -585,  -89,  807,  -865, 419,   529,   -1097, 962,   -312,  -545,
  974,  -481,  -465, 1158, -746, -1281, 1660,  -1221, 572,   237,   -777,
  910,  -535,  41,   212,  -225, 58,    191,   -415,  302,   -45,   314,
  -315, 378,   -483, 574,  -447, -14,   501,   -1003, 1185,  -802,  105,
  726,  -1272, 1230, -559, 206,  -336,  770,   -1189, 1242,  -1241, 1127,
  -912, 479,   -130, -121, 428,  -575,  443,   -257,  73,    177,   -171,
  166,  -216,  193,  -150, 237,  -426,  685,   -1052, 1332,  -1367, 1218,
  -929, 582,   -226,
};
#else   // CONFIG_LGT
// intra mode dependent transforms, trained without LGT
static const int32_t mdt16_mode0[256] = {
  241,   351,   423,  506,   586,   657,   709,   796,  849,  888,   878,  884,
  876,   866,   833,  765,   439,   700,   853,   930,  947,  878,   752,  557,
  309,   47,    -226, -507,  -743,  -906,  -983,  -909, 549,  887,   987,  824,
  495,   83,    -355, -813,  -1042, -1011, -732,  -337, 129,  584,   870,  857,
  594,   895,   790,  281,   -369,  -860,  -1035, -763, -144, 532,   977,  1009,
  587,   -133,  -761, -885,  760,   907,   424,   -322, -918, -964,  -400, 643,
  1108,  661,   -322, -899,  -903,  -284,  465,   818,  822,  764,   -61,  -886,
  -887,  -5,    908,  879,   -87,   -940,  -812,  205,  1029, 708,   -282, -851,
  890,   663,   -474, -1078, -269,  831,   753,   -490, -959, -3,    1002, 501,
  -690,  -926,  36,   832,   1104,  244,   -1050, -576, 878,  742,   -683, -834,
  371,   847,   -216, -868,  47,    897,   267,   -812, 889,  -128,  -931, 169,
  915,   -201,  -864, 411,   687,   -691,  -746,  923,  606,  -985,  -593, 922,
  1061,  -550,  -737, 855,   309,   -1040, 137,   910,  -588, -605,  932,  116,
  -899,  347,   784,  -724,  915,   -779,  -276,  925,  -502, -487,  913,  -350,
  -650,  950,   -142, -865,  843,   105,   -1066, 785,  865,  -1085, 445,  502,
  -1002, 602,   330,  -933,  731,   56,    -736,  804,  -164, -664,  1053, -604,
  682,   -1070, 901,  -305,  -465,  966,   -883,  314,  411,  -907,  854,  -352,
  -356,  868,   -946, 476,   375,   -764,  982,   -886, 517,  25,    -578, 920,
  -923,  538,   53,   -622,  1012,  -1079, 805,   -318, -85,  175,   -349, 558,
  -754,  920,   -970, 1050,  -1157, 1032,  -912,  798,  -623, 405,   -194, 39,
  321,   -647,  888,  -1034, 1027,  -876,  585,   -203, -209, 573,   -844, 979,
  -950,  769,   -485, 173,
};

static const int32_t mdt16_mode1[256] = {
  241,  344,   412,  489,   568,   636,   688,   783,   835,   872,   875,
  897,  905,   888,  846,   799,   474,   706,   859,   955,   992,   924,
  784,  567,   271,  16,    -257,  -509,  -691,  -856,  -922,  -885,  624,
  974,  943,   737,  444,   45,    -426,  -916,  -1064, -948,  -636,  -293,
  104,  537,   853,  923,   658,   917,   755,   257,   -395,  -916,  -1093,
  -713, 76,    720,  894,   854,   532,   -145,  -792,  -895,  477,   642,
  410,  -131,  -723, -911,  -514,  682,   1328,  690,   -538,  -1006, -947,
  -254, 523,   839,  966,   1056,  50,    -1197, -1262, 45,    1200,  786,
  -463, -776,  -185, 304,   448,   130,   -207,  -221,  8,     224,   30,
  -405, -258,  458,  466,   -617,  -817,  529,   1379,  306,   -1136, -1276,
  84,   1196,  1300, 462,   -1215, -1022, 722,   1063,  -494,  -845,  309,
  679,  -83,   -527, -158,  452,   284,   -452,  1049,  -173,  -1004, 253,
  803,  -428,  -615, 632,   361,   -889,  -314,  1030,  329,   -1085, -525,
  969,  1084,  -589, -561,  839,   83,    -937,  262,   668,   -673,  -273,
  1030, -188,  -973, 539,   912,   -869,  960,   -813,  -294,  857,   -543,
  -308, 873,   -514, -474,  1052,  -369,  -903,  919,   73,    -955,  724,
  777,  -1074, 575,  396,   -1026, 737,   219,   -883,  825,   -214,  -659,
  952,  -213,  -651, 958,   -517,  603,   -996,  906,   -363,  -344,  858,
  -848, 336,   319,  -831,  871,   -391,  -404,  985,   -1113, 564,   362,
  -718, 894,   -753, 338,   238,   -787,  997,   -950,  559,   3,     -607,
  1030, -1077, 831,  -315,  59,    -111,  44,    53,    -171,  358,   -506,
  763,  -1093, 1164, -1235, 1237,  -1029, 725,   -409,  126,   366,   -692,
  1008, -1269, 1328, -1224, 953,   -593,  226,   131,   -328,  403,   -399,
  302,  -186,  78,
};

static const int32_t mdt16_mode2[256] = {
  243,   333,  402,  493,   600,   683,  726,   772,  805,  846,  873,   895,
  898,   881,  846,  798,   415,   610,  711,   849,  922,  948,  821,   646,
  371,   124,  -199, -492,  -733,  -893, -1011, -994, 731,  1059, 1101,  867,
  506,   43,   -414, -818,  -969,  -974, -703,  -292, 129,  480,  686,   699,
  652,   913,  684,  158,   -409,  -886, -1006, -676, 121,  740,  1031,  933,
  457,   -208, -762, -943,  924,   958,  210,   -572, -924, -736, -94,   700,
  1008,  571,  -253, -918,  -984,  -302, 508,   885,  817,  698,  -148,  -1009,
  -834,  71,   999,  750,   -246,  -967, -639,  343,  1026, 676,  -306,  -899,
  933,   416,  -707, -1108, 152,   1146, 488,   -873, -925, 141,  958,   417,
  -585,  -756, 15,   633,   792,   11,   -903,  -345, 794,  578,  -689,  -742,
  534,   867,  -433, -1074, 208,   1190, 288,   -957, 1001, -190, -1047, 169,
  1011,  -302, -926, 536,   719,   -715, -636,  777,  566,  -800, -610,  774,
  986,   -545, -700, 828,   240,   -921, 206,   768,  -671, -514, 962,   162,
  -1026, 406,  914,  -828,  1062,  -957, -195,  1068, -799, -309, 863,   -378,
  -598,  912,  -236, -626,  728,   29,   -941,  701,  690,  -975, 487,   348,
  -928,  728,  112,  -895,  1042,  -248, -720,  938,  -305, -581, 1035,  -591,
  -182,  449,  -570, 711,   -1027, 1202, -1211, 1081, -970, 725,  -605,  514,
  -267,  91,   71,   -67,   540,   -974, 932,   -352, -395, 866,  -905,  415,
  346,   -912, 943,  -398,  -404,  975,  -983,  423,  515,  -969, 1191,  -1030,
  651,   -143, -464, 844,   -938,  751,  -280,  -261, 669,  -836, 709,   -309,
  110,   -292, 431,  -538,  582,   -511, 353,   -104, -287, 733,  -1103, 1308,
  -1317, 1097, -723, 272,
};

static const int32_t mdt16_mode3[256] = {
  256,  333,  394,   466,  540,   604,   657,   739,  821,   877,   907,  919,
  942,  931,  861,   775,  603,   824,   959,   1009, 978,   882,   725,  528,
  281,  -19,  -256,  -468, -674,  -808,  -872,  -798, 735,   909,   871,  680,
  326,  -108, -499,  -829, -1018, -984,  -707,  -260, 163,   595,   946,  949,
  742,  922,  660,   104,  -472,  -933,  -1063, -670, -18,   558,   963,  975,
  518,  -184, -788,  -870, 906,   825,   151,   -564, -971,  -823,  -120, 710,
  1100, 641,  -269,  -934, -924,  -294,  490,   814,  825,   750,   -206, -1161,
  -937, 351,  1187,  657,  -466,  -951,  -449,  373,  811,   499,   -253, -693,
  903,  332,  -884,  -885, 383,   1072,  229,   -878, -729,  341,   973,  382,
  -754, -908, 75,    799,  894,   91,    -1019, -386, 951,   494,   -816, -546,
  668,  581,  -591,  -858, 341,   1134,  127,   -996, 866,   -310,  -967, 301,
  841,  -578, -673,  863,  628,   -1026, -553,  964,  474,   -835,  -445, 691,
  992,  -708, -599,  884,  55,    -922,  425,   693,  -850,  -268,  1086, -200,
  -889, 573,  693,   -800, 966,   -930,  -144,  829,  -617,  -199,  812,  -558,
  -412, 953,  -428,  -669, 1008,  -79,   -1064, 791,  765,   -1097, 503,  362,
  -930, 724,  79,    -855, 947,   -225,  -636,  965,  -425,  -431,  1006, -653,
  448,  -838, 792,   -346, -356,  842,   -798,  260,  454,   -1006, 977,  -442,
  -408, 1005, -1128, 618,  483,   -906,  1081,  -928, 405,   256,   -801, 1052,
  -967, 631,  -119,  -387, 743,   -849,  686,   -304, 226,   -515,  759,  -938,
  968,  -867, 606,   -203, -217,  584,   -864,  1036, -1057, 886,   -596, 238,
  127,  -329, 544,   -728, 869,   -948,  981,   -970, 907,   -859,  845,  -805,
  715,  -549, 354,   -139,
};

static const int32_t mdt16_mode4[256] = {
  177,   249,  339,   455,   556,  628,   714,   808,   868,   894,   918,
  899,   889,  890,   846,   778,  427,   639,   785,   860,   903,   893,
  820,   672,  437,   162,   -128, -490,  -800,  -936,  -960,  -891,  585,
  848,   993,  905,   630,   234,  -228,  -684,  -975,  -1001, -783,  -401,
  82,    550,  852,   889,   682,  969,   876,   371,   -295,  -859,  -1024,
  -690,  -140, 418,   852,   991,  666,   -29,   -697,  -948,  854,   894,
  379,   -363, -979,  -979,  -280, 533,   986,   694,   -148,  -907,  -957,
  -242,  559,  847,   514,   621,  159,   -716,  -979,  -70,   963,   978,
  71,    -957, -1034, 153,   1071, 701,   -252,  -799,  1147,  697,   -641,
  -1138, -223, 849,   733,   -410, -991,  -172,  870,   683,   -442,  -782,
  -24,   603,  977,   224,   -904, -557,  689,   670,   -447,  -709,  259,
  802,   -170, -1001, 23,    1197, 396,   -1140, 1076,  -134,  -1088, 146,
  1034,  -291, -919,  419,   870,  -551,  -813,  594,   635,   -697,  -580,
  731,   878,  -604,  -689,  928,  198,   -1105, 300,   963,   -648,  -689,
  837,   177,  -836,  400,   751,  -768,  886,   -833,  -207,  896,   -542,
  -394,  917,  -392,  -689,  975,  -88,   -860,  850,   128,   -1092, 717,
  731,   -962, 263,   605,   -900, 521,   340,   -980,  714,   186,   -869,
  909,   -172, -747,  1122,  -601, 690,   -1041, 760,   -128,  -637,  968,
  -729,  58,   658,   -1012, 771,  -123,  -580,  976,   -915,  407,   507,
  -923,  998,  -762,  246,   336,  -842,  1063,  -853,  385,   167,   -629,
  911,   -967, 740,   -286,  315,  -685,  924,   -1027, 969,   -757,  417,
  -13,   -392, 731,   -937,  1008, -938,  730,   -450,  161,   155,   -364,
  555,   -728, 851,   -956,  1029, -1038, 986,   -920,  831,   -713,  588,
  -428,  256,  -98,
};

static const int32_t mdt16_mode5[256] = {
  175,  249,  322,   426,   527,   603,   702,   785,  814,  844,   870,  904,
  926,  935,  914,   862,   286,   512,   736,   898,  965,  981,   923,  738,
  466,  170,  -143,  -475,  -738,  -868,  -937,  -859, 463,  699,   885,  910,
  707,  352,  -154,  -677,  -1012, -1086, -895,  -475, 65,   550,   836,  855,
  772,  1191, 1059,  403,   -245,  -732,  -989,  -749, -153, 453,   851,  880,
  486,  -108, -635,  -759,  852,   1037,  428,   -458, -984, -836,  -112, 780,
  1023, 354,  -472,  -915,  -818,  -202,  514,   836,  713,  645,   -129, -850,
  -753, 199,  1007,  760,   -272,  -1071, -756,  428,  1121, 611,   -405, -870,
  995,  641,  -674,  -1109, 35,    1010,  595,   -672, -941, 214,   919,  302,
  -645, -791, 42,    752,   1293,  34,    -1199, -189, 984,  309,   -762, -447,
  580,  632,  -358,  -803,  103,   1005,  209,   -909, 955,  -373,  -815, 445,
  772,  -514, -681,  635,   523,   -908,  -386,  1015, 362,  -1060, -567, 945,
  752,  -465, -422,  851,   -52,   -1079, 500,   890,  -954, -459,  1080, 48,
  -985, 434,  743,   -703,  964,   -952,  -44,   979,  -833, -314,  967,  -609,
  -407, 978,  -310,  -669,  806,   -40,   -870,  650,  782,  -1045, 568,  250,
  -934, 845,  5,     -763,  863,   -294,  -468,  941,  -536, -449,  1115, -683,
  483,  -852, 771,   -328,  -401,  885,   -856,  439,  218,  -832,  975,  -486,
  -397, 1072, -1146, 558,   474,   -842,  989,   -851, 453,  110,   -672, 994,
  -926, 587,  -31,   -587,  952,   -977,  758,   -333, 287,  -651,  945,  -1104,
  1100, -980, 713,   -346,  -56,   435,   -727,  847,  -859, 723,   -486, 194,
  100,  -207, 338,   -468,  609,   -743,  859,   -960, 1057, -1113, 1099, -964,
  745,  -501, 320,   -135,
};

static const int32_t mdt16_mode6[256] = {
  209,   316,   419,   491,  546,   630,  724,  783,   813,   847,   891,
  893,   886,   882,   875,  836,   382,  624,  823,   926,   976,   957,
  839,   627,   335,   50,   -227,  -519, -740, -860,  -928,  -877,  541,
  816,   903,   785,   542,  170,   -306, -737, -1032, -1056, -811,  -416,
  29,    525,   905,   965,  711,   969,  851,  422,   -208,  -780,  -1001,
  -808,  -260,  463,   947,  1004,  556,  -164, -718,  -834,  818,   1008,
  479,   -404,  -1009, -963, -249,  642,  1077, 662,   -324,  -931,  -796,
  -222,  397,   694,   779,  605,   -57,  -731, -722,  -13,   776,   858,
  -61,   -1015, -878,  259,  1152,  823,  -252, -1039, 863,   678,   -491,
  -1151, -359,  838,   849,  -328,  -916, -133, 741,   645,   -462,  -1016,
  -185,  927,   1090,  248,  -982,  -646, 781,  927,   -570,  -961,  332,
  932,   -135,  -842,  7,    830,   312,  -740, 985,   -226,  -1041, 298,
  1051,  -420,  -892,  527,  784,   -602, -711, 773,   461,   -862,  -455,
  771,   1046,  -533,  -630, 637,   214,  -851, 231,   772,   -647,  -530,
  1074,  49,    -1103, 346,  983,   -795, 1010, -973,  -207,  980,   -545,
  -455,  905,   -306,  -671, 887,   -169, -805, 781,   169,   -996,  676,
  743,   -1067, 540,   461,  -1053, 713,  196,  -900,  829,   -60,   -710,
  883,   -239,  -678,  993,  -503,  600,  -965, 882,   -395,  -379,  931,
  -976,  377,   439,   -984, 979,   -456, -237, 745,   -933,  499,   308,
  -729,  942,   -842,  447,  124,   -668, 1001, -1033, 725,   -144,  -443,
  896,   -1058, 818,   -317, 310,   -703, 1002, -1150, 1115,  -945,  704,
  -410,  40,    342,   -635, 806,   -852, 736,  -455,  152,   52,    -124,
  273,   -448,  615,   -746, 869,   -957, 968,  -970,  985,   -1000, 946,
  -745,  418,   -127,
};

static const int32_t mdt16_mode7[256] = {
  170,  268,   332,   401,  477,  537,  602,   674,   750,   814,  863,
  930,  983,   997,   993,  950,  477,  702,   841,   934,   996,  965,
  861,  698,   494,   217,  -68,  -336, -594,  -779,  -891,  -880, 594,
  833,  930,   841,   578,  170,  -315, -748,  -994,  -1020, -868, -515,
  11,   494,   807,   899,  808,  1028, 808,   296,   -368,  -934, -1086,
  -728, -116,  456,   883,  945,  568,  -103,  -624,  -778,  941,  915,
  280,  -528,  -1047, -897, -17,  853,  998,   433,   -343,  -846, -855,
  -273, 467,   799,   1059, 682,  -405, -1077, -681,  433,   1119, 512,
  -568, -995,  -450,  483,  910,  476,  -307,  -645,  844,   258,  -659,
  -696, 213,   891,   268,  -814, -821, 357,   1145,  398,   -954, -1025,
  132,  934,   1037,  36,   -975, -423, 785,   605,   -734,  -780, 654,
  899,  -416,  -964,  160,  990,  234,  -807,  839,   -339,  -961, 321,
  949,  -379,  -837,  582,  697,  -725, -685,  789,   612,   -921, -598,
  881,  987,   -740,  -697, 1038, 222,  -1002, 281,   772,   -654, -454,
  883,  -9,    -871,  565,  713,  -759, 835,   -1005, 14,    979,  -811,
  -269, 992,   -644,  -387, 979,  -350, -613,  832,   -112,  -900, 686,
  566,  -879,  467,   402,  -963, 757,  -1,    -745,  921,   -282, -720,
  1075, -420,  -566,  1151, -660, 575,  -1018, 928,   -330,  -456, 933,
  -907, 415,   317,   -828, 841,  -345, -375,  935,   -1043, 509,  396,
  -728, 805,   -616,  212,  275,  -736, 1058,  -1021, 622,   -9,   -581,
  977,  -1079, 913,   -416, 341,  -736, 1002,  -1122, 1084,  -871, 518,
  -139, -281,  637,   -867, 941,  -810, 584,   -338,  111,   175,  -388,
  533,  -641,  717,   -786, 862,  -939, 1012,  -1034, 976,   -850, 709,
  -568, 379,   -135,
};

static const int32_t mdt16_mode8[256] = {
  203,   279,   351,  414,  518,   627,   705,   769,   814,   864,   901,
  925,   920,   912,  902,  810,   382,   649,   829,   917,   982,   960,
  857,   687,   406,  63,   -223,  -457,  -691,  -870,  -936,  -816,  666,
  958,   979,   820,  493,  117,   -317,  -782,  -1030, -1010, -765,  -295,
  187,   580,   829,  784,  749,   959,   800,   269,   -413,  -820,  -899,
  -698,  -124,  622,  1047, 952,   466,   -200,  -770,  -895,  807,   857,
  301,   -381,  -824, -740, -259,  436,   954,   750,   -71,   -954,  -1127,
  -449,  551,   1058, 1040, 846,   -238,  -1131, -905,  60,    832,   884,
  39,    -817,  -761, 131,  854,   591,   -231,  -751,  924,   351,   -832,
  -1009, 247,   1145, 497,  -727,  -979,  78,    886,   511,   -565,  -842,
  -52,   715,   884,  21,   -910,  -259,  947,   571,   -806,  -781,  602,
  896,   -331,  -948, 75,   1006,  303,   -972,  848,   -213,  -887,  335,
  920,   -460,  -920, 479,  743,   -545,  -711,  695,   742,   -872,  -720,
  963,   1111,  -646, -783, 977,   223,   -1070, 390,   830,   -689,  -456,
  810,   81,    -850, 300,  734,   -660,  619,   -615,  -191,  776,   -554,
  -355,  1042,  -439, -672, 1033,  -185,  -979,  918,   220,   -1140, 759,
  832,   -1100, 377,  575,  -1037, 586,   387,   -991,  823,   31,    -842,
  885,   -152,  -644, 821,  -425,  734,   -1158, 924,   -266,  -418,  870,
  -861,  366,   315,  -881, 888,   -398,  -357,  891,   -911,  452,   433,
  -860,  1017,  -820, 442,  28,    -557,  915,   -1004, 757,   -204,  -432,
  861,   -1024, 829,  -352, 233,   -509,  777,   -944,  964,   -865,  567,
  -206,  -174,  590,  -917, 1039,  -1035, 879,   -585,  234,   133,   -293,
  495,   -700,  842,  -931, 992,   -1005, 980,   -959,  890,   -766,  641,
  -475,  275,   -93,
};

static const int32_t mdt16_mode9[256] = {
  216,  339,   433,  508,  594,   658,   704,  769,   828,   869,   878,
  887,  889,   874,  848,  798,   417,   672,  846,   922,   955,   905,
  766,  565,   341,  80,   -226,  -517,  -728, -887,  -973,  -925,  572,
  884,  988,   856,  511,  71,    -387,  -826, -1038, -993,  -755,  -347,
  119,  547,   835,  841,  708,   965,   807,  273,   -445,  -960,  -1067,
  -686, -17,   635,  1012, 911,   401,   -236, -690,  -742,  634,   749,
  368,  -328,  -855, -836, -242,  687,   1087, 607,   -303,  -1003, -1084,
  -319, 611,   962,  954,  893,   -37,   -951, -954,  -5,    904,   845,
  -88,  -889,  -730, 219,  935,   652,   -264, -765,  910,   491,   -560,
  -910, -154,  861,  723,  -507,  -1001, -9,   1011,  538,   -748,  -1000,
  78,   868,   1059, 244,  -973,  -583,  758,  731,   -587,  -920,  370,
  960,  -177,  -952, 26,   953,   279,   -799, 1127,  -227,  -1119, 323,
  1010, -393,  -880, 584,  680,   -726,  -592, 771,   436,   -791,  -431,
  699,  847,   -596, -532, 862,   149,   -937, 289,   836,   -714,  -430,
  961,  -51,   -970, 587,  899,   -945,  849,  -783,  -240,  950,   -541,
  -554, 972,   -332, -621, 965,   -195,  -845, 868,   33,    -1013, 768,
  804,  -1105, 452,  534,  -1031, 657,   253,  -913,  812,   -13,   -757,
  842,  -171,  -602, 985,  -578,  623,   -981, 776,   -190,  -505,  949,
  -817, 249,   417,  -924, 902,   -390,  -385, 969,   -1069, 540,   443,
  -838, 1011,  -863, 392,  196,   -715,  963,  -889,  496,   68,    -621,
  988,  -1013, 754,  -306, 364,   -715,  964,  -1106, 1076,  -903,  611,
  -259, -132,  484,  -763, 912,   -874,  702,  -475,  185,   87,    -185,
  328,  -503,  679,  -843, 925,   -997,  1088, -1087, 1004,  -864,  695,
  -506, 306,   -102,
};

static const int32_t mdt16_mode10[256] = {
  208,  322,   387,   482,   594,  688,   745,   789,  840,   880,   906,
  898,  872,   847,   822,   772,  415,   695,   865,  919,   966,   862,
  713,  608,   377,   48,    -283, -543,  -734,  -890, -951,  -912,  538,
  911,  1051,  940,   522,   -53,  -534,  -786,  -935, -898,  -674,  -317,
  89,   551,   866,   898,   506,  699,   635,   310,  -205,  -642,  -876,
  -797, -338,  432,   1081,  1182, 732,   -149,  -892, -1032, 588,   985,
  650,  -266,  -1101, -1175, -380, 504,   993,   874,  77,    -708,  -852,
  -303, 301,   649,   1212,  1049, -222,  -1152, -827, 288,   922,   595,
  -245, -882,  -644,  219,   769,  506,   -141,  -553, 839,   496,   -655,
  -849, 217,   1060,  258,   -926, -768,  445,   1002, 145,   -951,  -873,
  193,  822,   1009,  52,    -957, -190,  935,   234,  -935,  -593,  754,
  798,  -369,  -934,  117,   995,  376,   -950,  809,  -6,    -936,  162,
  865,  -483,  -859,  622,   756,  -745,  -533,  890,  367,   -1035, -532,
  1016, 979,   -581,  -607,  842,  127,   -987,  351,  958,   -776,  -580,
  1047, 35,    -871,  242,   811,  -688,  1074,  -902, -259,  987,   -601,
  -310, 942,   -508,  -473,  934,  -421,  -624,  813,  -39,   -946,  748,
  788,  -1052, 621,   298,   -858, 618,   51,    -791, 947,   -246,  -605,
  889,  -255,  -746,  1158,  -603, 695,   -1042, 910,  -404,  -340,  878,
  -923, 430,   303,   -821,  889,  -485,  -274,  868,  -1002, 527,   309,
  -631, 875,   -891,  536,   -26,  -536,  892,   -924, 611,   -16,   -660,
  1139, -1155, 781,   -243,  270,  -428,  480,   -512, 401,   -144,  -174,
  506,  -827,  1070,  -1229, 1303, -1145, 811,   -396, 87,    227,   -489,
  801,  -1077, 1244,  -1280, 1189, -951,  652,   -473, 281,   -63,   -76,
  138,  -163,  100,
};

static const int32_t mdt16_mode11[256] = {
  191,  288,   368,  455,   547,   616,   665,   742,   835,   886,   903,
  922,  918,   894,  885,   825,   521,   740,   882,   958,   954,   900,
  786,  578,   350,  127,   -144,  -464,  -732,  -848,  -893,  -881,  644,
  935,  1019,  831,  444,   28,    -460,  -862,  -992,  -911,  -692,  -303,
  109,  543,   871,  876,   652,   825,   737,   258,   -444,  -957,  -1109,
  -729, 45,    708,  1019,  927,   454,   -239,  -708,  -796,  637,   644,
  271,  -298,  -777, -862,  -423,  614,   1277,  714,   -344,  -1046, -1036,
  -193, 594,   830,  878,   867,   119,   -780,  -1068, -338,  1005,  1101,
  -213, -1079, -531, 427,   876,   253,   -419,  -291,  139,   195,   -3,
  -333, -354,  165,  680,   -103,  -960,  -93,   1112,  622,   -750,  -1503,
  -113, 1485,  1406, 614,   -1014, -1242, 268,   1140,  62,    -879,  -271,
  600,  294,   -378, -284,  455,   340,   -501,  927,   -145,  -1034, 84,
  1086, -49,   -907, 143,   784,   -408,  -744,  501,   757,   -808,  -809,
  971,  1036,  -591, -842,  832,   495,   -954,  -103,  908,   -441,  -708,
  830,  312,   -952, 333,   792,   -666,  699,   -616,  -313,  786,   -168,
  -684, 787,   -119, -820,  989,   206,   -1340, 809,   445,   -998,  581,
  936,  -1122, 150,  789,   -1063, 299,   711,   -932,  485,   332,   -973,
  812,  -1,    -659, 722,   -329,  579,   -974,  695,   4,     -703,  965,
  -531, -130,  683,  -1020, 820,   -153,  -556,  1005,  -1051, 520,   475,
  -871, 886,   -568, 60,    443,   -744,  697,   -311,  -141,  562,   -976,
  1177, -1134, 915,  -406,  333,   -623,  701,   -542,  182,   254,   -691,
  1033, -1185, 1162, -1044, 877,   -660,  483,   -384,  182,   318,   -720,
  1059, -1265, 1315, -1198, 979,   -748,  477,   -216,  11,    135,   -201,
  162,  -68,   16,
};

static const int32_t mdt16_mode12[256] = {
  181,  228,   274,   379,   479,   534,   618,   688,   769,   879,  924,
  926,  938,   967,   973,   938,   402,   518,   650,   782,   960,  1010,
  1006, 898,   566,   218,   -76,   -417,  -684,  -803,  -877,  -857, 629,
  878,  1009,  913,   636,   271,   -173,  -594,  -870,  -1039, -941, -524,
  70,   504,   765,   819,   469,   725,   796,   619,   115,   -470, -904,
  -892, -447,  404,   945,   990,   739,   54,    -841,  -1134, 796,  985,
  781,  -133,  -1031, -1035, -578,  251,   1042,  838,   123,   -693, -887,
  -358, 385,   527,   884,   874,   -31,   -1032, -988,  -10,   729,  824,
  63,   -768,  -714,  163,   984,   786,   -191,  -917,  1133,  604,  -570,
  -874, -70,   592,   403,   -264,  -866,  -310,  810,   862,   -463, -1227,
  -168, 1034,  1172,  162,   -1220, -589,  947,   713,   -639,  -914, 467,
  867,  -273,  -743,  -120,  713,   271,   -557,  459,   -150,  -508, 301,
  717,  -502,  -967,  471,   1170,  -526,  -1075, 738,   872,   -791, -748,
  770,  657,   -213,  -727,  535,   626,   -975,  -420,  1165,  -258, -985,
  784,  372,   -1008, 424,   841,   -728,  1110,  -792,  -542,  984,  -289,
  -925, 895,   160,   -834,  704,   71,    -831,  531,   319,   -937, 594,
  921,  -1147, 182,   798,   -925,  314,   592,   -920,  602,   -54,  -639,
  932,  -240,  -545,  990,   -653,  704,   -1209, 837,   -215,  -545, 1114,
  -942, 258,   428,   -873,  883,   -476,  -128,  675,   -785,  392,  410,
  -740, 731,   -601,  325,   165,   -722,  997,   -994,  750,   -204, -464,
  949,  -1110, 994,   -450,  284,   -668,  1015,  -1017, 765,   -554, 236,
  85,   -392,  667,   -921,  1079,  -1067, 858,   -553,  222,   199,  -429,
  660,  -894,  1022,  -1062, 991,   -892,  803,   -819,  801,   -673, 577,
  -403, 247,   -116,
};
#endif  // CONFIG_LGT
#endif  // MDTX_INTRA_16

#if CONFIG_MODE_DEP_INTRA_TX && CONFIG_MODE_DEP_NONSEP_INTRA_TX
// non-separable transforms
static const int32_t mdt4x4_mode0[256] = {
  5,   11,  17,  22,  8,   28,  43,  44,  14,  38,  51,  47,  20,  34,  39,
  38,  24,  54,  40,  4,   36,  68,  36,  -10, 14,  10,  -12, -20, -14, -36,
  -36, -20, 14,  -5,  -36, -37, 40,  29,  -37, -59, 34,  48,  8,   -26, 10,
  26,  31,  17,  -38, -37, 23,  40,  -12, -4,  14,  9,   40,  46,  -17, -46,
  38,  32,  -22, -44, 38,  2,   -14, 44,  64,  -16, -48, 53,  35,  -14, -38,
  16,  -3,  4,   2,   -8,  -38, 28,  48,  -26, -8,  -6,  -14, -16, 42,  -26,
  -54, 28,  41,  7,   -1,  52,  4,   -7,  32,  71,  -4,  2,   -8,  -26, -25,
  -3,  -12, -51, -28, -10, 42,  58,  -59, -51, -8,  -2,  18,  16,  -1,  8,
  39,  16,  8,   27,  -52, -62, -4,  18,  -39, 33,  38,  -23, 9,   -6,  -15,
  12,  2,   -7,  0,   -6,  -56, 32,  64,  -55, 38,  -40, 44,  -27, 46,  -62,
  52,  -24, 18,  -10, 10,  -4,  -21, 15,  -10, 8,   -32, -46, 4,   9,   53,
  52,  6,   -19, -48, -52, -4,  18,  26,  32,  1,   -14, 17,  -23, 34,  -19,
  -10, 14,  -28, 11,  -51, 64,  -46, 32,  -34, 29,  -32, 13,  -16, 23,  40,
  30,  20,  -28, -57, -36, -12, 14,  67,  28,  15,  -11, -36, -13, -50, 37,
  -28, -14, 41,  -20, 9,   35,  -22, 5,   12,  -46, -16, 31,  -45, 44,  -2,
  19,  -35, 44,  -22, 6,   20,  -48, 32,  -17, -9,  38,  -52, 56,  -32, -1,
  24,  -28, 30,  -21, -33, 40,  -41, 30,  34,  -43, 43,  -32, -21, 30,  -28,
  18
};

static const int32_t mdt4x4_mode1[256] = {
  22,  11,  0,   0,   50,  28,  0,   -1,  66,  42,  2,   -2,  66,  44,  4,
  -2,  -7,  20,  8,   -2,  -24, 46,  20,  -6,  -40, 60,  32,  -8,  -44, 56,
  35,  -5,  58,  30,  -2,  -2,  70,  38,  -4,  -1,  0,   -4,  -5,  3,   -62,
  -42, -4,  4,   12,  -65, -28, 8,   36,  -60, -30, 6,   14,  11,  11,  -5,
  -44, 38,  38,  -10, 2,   -4,  30,  4,   11,  -13, 56,  9,   16,  -26, 69,
  14,  16,  -33, 66,  20,  -80, -16, 13,  -6,  2,   20,  3,   -12, 66,  32,
  -8,  -10, -42, -39, -4,  -2,  0,   23,  -26, -40, -6,  4,   -28, -56, 2,
  -21, 10,  -59, 16,  -18, 46,  -54, -7,  32,  60,  -12, 16,  -30, 38,  -5,
  21,  -47, -22, -12, -30, 54,  -16, -38, -28, 58,  -22, 5,   -8,  6,   -49,
  24,  22,  -36, -22, 40,  -12, 24,  54,  34,  -6,  -4,  -6,  -74, 14,  -16,
  6,   -60, -4,  -4,  14,  16,  -6,  20,  -22, 73,  50,  32,  -36, -5,  -64,
  -31, 16,  2,   60,  17,  28,  8,   -27, -5,  -23, -6,  44,  -52, 18,  2,
  -42, 42,  18,  -22, 24,  -21, -62, -7,  -8,  6,   40,  24,  20,  28,  68,
  -4,  -8,  -54, -33, -4,  -8,  58,  -29, -14, 6,   -28, 26,  22,  7,   -19,
  12,  -73, -4,  8,   -4,  24,  -4,  14,  -10, 76,  6,   -12, 12,  -57, -14,
  20,  -55, -24, 18,  -26, 71,  30,  -15, 23,  -57, -22, 6,   -10, 24,  8,
  6,   -12, 15,  -56, -10, 18,  -22, 82,  8,   -14, 20,  -62, -4,  6,   -10,
  24
};

static const int32_t mdt4x4_mode2[256] = {
  19,  48,  68,  71,  9,   22,  37,  46,  1,   0,   2,   6,   -1,  -4,  -4,
  -4,  0,   -10, -34, -47, 24,  52,  60,  48,  10,  24,  36,  40,  1,   -2,
  -2,  2,   53,  78,  8,   -50, 28,  36,  -12, -50, -4,  -8,  -9,  -8,  -5,
  -6,  1,   8,   -31, -26, 14,  35,  36,  50,  -10, -56, 42,  58,  17,  -21,
  2,   2,   10,  18,  -17, -22, -12, -4,  20,  38,  32,  5,   -10, -28, -53,
  -66, -17, -30, -39, -42, -70, 14,  70,  -54, -42, -2,  32,  -22, 7,   -2,
  -6,  11,  8,   -2,  -10, 2,   -8,  21,  4,   -30, 20,  -16, -28, 58,  59,
  28,  -43, -36, 32,  38,  22,  -8,  -34, -3,  23,  -8,  60,  4,   -62, 20,
  3,   -22, -8,  58,  -34, -29, -17, -21, -24, -15, 2,   6,   28,  30,  8,
  4,   -32, -59, -32, 4,   22,  34,  52,  62,  -12, 18,  -30, 27,  -14, 28,
  -5,  -26, 12,  -19, -17, 46,  71,  34,  -28, -52, -63, 63,  -45, 16,  -30,
  28,  -30, 24,  -30, 10,  26,  -26, -20, -8,  14,  2,   30,  -25, 10,  -4,
  -64, 57,  -40, 22,  -2,  26,  -48, 22,  -3,  -23, -14, 32,  14,  -28, 40,
  -22, 6,   24,  -31, 12,  -72, 24,  34,  -23, 22,  38,  12,  -47, -6,  4,
  3,   -5,  24,  -14, -15, 16,  -16, 2,   26,  -23, 70,  -36, -68, 54,  -14,
  16,  -14, 6,   26,  -28, 22,  -10, -54, 66,  -56, 24,  -20, 34,  -31, 17,
  3,   -4,  4,   -2,  -10, 15,  -12, 6,   23,  -30, 26,  -12, -46, 80,  -66,
  24
};

static const int32_t mdt4x4_mode3[256] = {
  2,   3,   10,  21,  8,   16,  30,  40,  20,  35,  46,  44,  35,  48,  46,
  38,  10,  26,  26,  11,  40,  53,  24,  -12, 58,  36,  -16, -34, 34,  -11,
  -37, -28, 50,  40,  -11, -20, 74,  14,  -32, -4,  17,  -32, -6,  28,  -34,
  -15, 28,  30,  -24, -8,  -28, -53, -10, -14, -52, -38, 42,  1,   -22, 7,
  66,  24,  12,  18,  -68, 26,  51,  -5,  -31, 40,  6,   -9,  14,  -20, -22,
  26,  -19, -40, 16,  42,  36,  46,  14,  -46, -27, 36,  16,  -48, -66, 23,
  12,  -8,  10,  25,  -2,  15,  -22, -40, -52, -47, 5,   38,  12,  -10, 16,
  48,  42,  10,  -48, -28, -2,  -4,  52,  -61, -1,  34,  -12, 4,   12,  -31,
  -2,  22,  -36, 2,   13,  -38, 0,   65,  -18, -34, 44,  10,  28,  -6,  -8,
  -46, 9,   16,  -13, -34, -52, 66,  32,  2,   46,  -34, 42,  -34, -32, 4,
  26,  -16, 36,  -44, 22,  20,  6,   -12, 36,  -50, -21, 21,  -23, 5,   22,
  -43, 64,  -48, 14,  -35, 44,  -38, 13,  -18, 8,   30,  -9,  -28, 54,  -58,
  46,  -42, 21,  21,  -18, 10,  0,   26,  9,   -4,  -54, 20,  -29, -38, 11,
  20,  50,  40,  -28, -16, -56, -22, 30,  -2,  48,  -26, 23,  -21, 2,   28,
  26,  -6,  2,   -52, -20, 0,   -6,  68,  2,   -14, 5,   -56, 59,  -20, -18,
  2,   -34, -4,  24,  -4,  62,  -14, -22, 5,   -72, 45,  6,   8,   30,  -37,
  2,   -16, -8,  -45, 2,   22,  20,  64,  -9,  -17, -30, -75, 8,   0,   40,
  22
};

static const int32_t mdt4x4_mode4[256] = {
  25,  28,  20,  13,  20,  44,  38,  26,  6,   32,  52,  45,  0,   10,  36,
  52,  1,   -30, -42, -24, 26,  10,  -40, -50, 22,  49,  16,  -38, 2,   33,
  50,  16,  -12, -6,  38,  44,  16,  -22, -8,  52,  40,  30,  -34, -4,  16,
  58,  24,  -37, -42, 5,   -6,  -62, -22, -34, 26,  -16, 40,  -16, -10, 52,
  33,  42,  -4,  26,  53,  42,  -17, -32, 29,  43,  26,  -19, 19,  4,   -11,
  -2,  21,  26,  -35, -62, -25, 0,   2,   -56, 28,  -14, 18,  20,  -24, 38,
  -16, 28,  -61, -30, 34,  -44, 9,   -69, -40, 6,   42,  6,   -23, 34,  10,
  14,  8,   53,  10,  -10, -56, 4,   -32, 20,  50,  -7,  64,  -2,  2,   -24,
  32,  24,  -22, -28, 10,  -41, -40, 38,  60,  26,  -18, 2,   40,  -40, -25,
  2,   10,  -44, -50, 20,  -31, 4,   26,  38,  36,  -22, 50,  -74, -11, 13,
  -38, 50,  -21, -9,  1,   -28, 28,  6,   2,   17,  -12, 26,  -44, 2,   28,
  -27, 10,  29,  -24, 0,   2,   -10, 84,  -42, 38,  -9,  24,  0,   20,  13,
  -16, -16, -4,  -42, -70, 59,  -45, 34,  30,  16,  -13, 13,  18,  -45, 31,
  7,   -15, 36,  4,   -34, 40,  -19, -32, 33,  26,  -52, 48,  -22, 30,  -1,
  -36, -7,  -54, -6,  36,  32,  42,  52,  -38, -30, -10, -30, -14, 28,  21,
  -62, 10,  0,   31,  -27, 86,  -10, -22, -21, 2,   -36, -2,  21,  6,   8,
  46,  4,   28,  -2,  -10, -77, -10, -20, 29,  22,  65,  9,   4,   -24, -9,
  -27
};

static const int32_t mdt4x4_mode5[256] = {
  21,  12,  2,   -1,  43,  40,  10,  0,   42,  58,  32,  8,   22,  52,  46,
  26,  -2,  -20, -12, 1,   23,  -24, -34, -10, 50,  2,   -50, -35, 46,  38,
  -32, -52, -23, 6,   29,  -1,  -12, -22, 38,  24,  40,  -34, 4,   53,  65,
  1,   -31, 40,  52,  16,  9,   3,   78,  8,   10,  17,  25,  -18, -22, 26,
  -44, -32, -42, 0,   16,  59,  -8,  -27, -13, 59,  24,  -43, -4,  -1,  12,
  -30, 44,  -33, -36, -22, -8,  -35, -31, -30, 24,  -20, -25, -59, 32,  -21,
  20,  -24, 6,   -44, 14,  60,  9,   12,  -35, 56,  -4,  24,  -52, 52,  12,
  -8,  2,   4,   40,  -54, 31,  -2,  80,  -6,  -32, -1,  -2,  -22, -15, -4,
  -60, -18, 6,   10,  38,  40,  -16, 30,  0,   62,  -22, -20, 7,   -24, 1,
  -4,  18,  -74, 10,  5,   -14, 30,  56,  -27, -30, 27,  -48, -42, -18, 26,
  -50, -2,  4,   22,  -34, 60,  -20, 18,  -26, 22,  -32, 28,  -30, 66,  5,
  8,   2,   0,   6,   -17, 26,  -43, -27, 40,  -50, 41,  6,   34,  60,  8,
  -6,  12,  -22, -10, -11, -8,  -76, -31, 4,   4,   27,  55,  56,  8,   -24,
  18,  -74, -24, 28,  -10, 60,  24,  -19, -2,  -29, -8,  3,   9,   -4,  60,
  16,  -22, 10,  -76, -26, 23,  -6,  54,  30,  -20, 5,   -21, -15, 6,   -26,
  11,  -60, 14,  32,  -24, 68,  -2,  -29, 26,  -54, -1,  18,  -16, 23,  7,
  5,   -18, -21, -64, -8,  20,  18,  82,  9,   -14, -5,  -56, -6,  6,   -4,
  22
};

static const int32_t mdt4x4_mode6[256] = {
  28,  46,  45,  30,  14,  34,  54,  62,  -3,  6,   23,  41,  -2,  -4,  -2,
  8,   2,   -20, -48, -46, 30,  40,  10,  -29, 6,   30,  54,  52,  -4,  -4,
  14,  38,  -22, -25, 28,  66,  6,   -14, -25, 2,   38,  50,  18,  -13, -8,
  14,  46,  52,  47,  58,  -2,  -52, -33, -22, 6,   -2,  24,  10,  -16, -28,
  15,  27,  41,  48,  27,  44,  31,  14,  32,  35,  -24, -65, -12, 0,   3,
  -34, -40, -48, -12, 13,  20,  -22, -43, 0,   -30, -14, 30,  40,  22,  30,
  0,   -34, -57, -62, -22, 8,   39,  -4,  -36, 10,  57,  36,  -5,  20,  19,
  30,  -10, -46, 9,   38,  22,  -55, -58, 14,  44,  -64, 32,  1,   -10, 20,
  50,  22,  -24, 6,   -34, -10, 4,   -24, -29, -24, 4,   10,  -20, 60,  73,
  -34, 24,  -16, -49, -22, 13,  5,   10,  16,  19,  -18, -19, 7,   30,  6,
  -26, 26,  -10, -57, -58, 34,  -45, -5,  46,  31,  32,  -16, 4,   2,   38,
  -13, -14, 2,   44,  8,   -40, 18,  54,  -18, -68, 38,  -27, -21, 15,  -30,
  34,  11,  0,   44,  -60, -8,  14,  -62, 26,  -10, -3,  48,  56,  -66, 61,
  -28, 3,   -23, 26,  -22, -26, 23,  -6,  6,   -26, 24,  2,   -10, 12,  -12,
  14,  -10, -58, 65,  -57, 22,  -23, 44,  -30, 17,  20,  -18, 4,   -6,  -24,
  30,  -26, 12,  8,   -6,  10,  -6,  -46, 52,  -44, 12,  -39, 55,  -44, 24,
  8,   -14, 10,  -8,  -25, 38,  -30, 16,  36,  -44, 36,  -18, -40, 59,  -50,
  20
};

static const int32_t mdt4x4_mode7[256] = {
  -2,  -4,  2,   14,  0,   7,   22,  34,  8,   28,  45,  51,  36,  54,  52,
  47,  11,  36,  63,  66,  22,  45,  42,  26,  20,  16,  -4,  -16, -1,  -14,
  -20, -16, 50,  79,  32,  -24, 18,  2,   -30, -31, -20, -36, -14, 18,  0,
  12,  26,  29,  24,  26,  -40, -77, 28,  50,  31,  15,  32,  30,  14,  8,
  4,   -14, -22, -16, 53,  28,  -14, 4,   -40, -54, 14,  60,  -32, -6,  24,
  4,   6,   6,   -20, -46, 64,  -28, -64, 53,  48,  22,  -10, 2,   -18, -9,
  5,   -9,  -24, -10, 14,  17,  -24, -9,  9,   4,   56,  19,  -36, -11, -33,
  -15, 30,  28,  26,  36,  -10, -75, 18,  14,  4,   12,  20,  -43, -68, -2,
  64,  64,  10,  -20, 4,   6,   2,   -10, 36,  -4,  -14, 18,  -42, 18,  18,
  -72, 0,   15,  3,   -21, 71,  24,  -22, -8,  -4,  0,   -24, 8,   13,  -3,
  -8,  43,  46,  -48, -75, 7,   56,  20,  -6,  -3,  -3,  -9,  14,  -3,  20,
  -7,  -29, 20,  -32, 6,   19,  14,  55,  -55, -61, 54,  -20, 14,  -4,  -19,
  38,  -14, 18,  20,  -45, 19,  -8,  -92, 22,  32,  19,  16,  -59, 74,  -62,
  38,  -24, 19,  -21, 0,   -2,  -5,  22,  -4,  0,   -14, -2,  4,   12,  -12,
  10,  -8,  -49, 66,  -58, 38,  -36, 38,  -36, -5,  -4,  10,  11,  -6,  -10,
  16,  -16, 12,  18,  -23, 20,  -16, -30, 52,  -56, 44,  -30, 42,  -51, 14,
  5,   -7,  8,   -5,  -11, 19,  -19, 12,  26,  -40, 37,  -28, -34, 66,  -64,
  33
};

static const int32_t mdt4x4_mode8[256] = {
  4,   8,   16,  28,  14,  24,  36,  39,  30,  42,  42,  34,  42,  48,  38,
  27,  16,  19,  8,   -18, 46,  36,  -7,  -34, 62,  24,  -30, -34, 48,  -2,
  -38, -26, 49,  18,  -22, 2,   72,  0,   -30, 22,  24,  -34, -4,  36,  -35,
  -30, 24,  30,  -30, -29, -32, 0,   -22, -47, -43, 16,  38,  -28, -24, 26,
  70,  -4,  2,   22,  -46, 46,  35,  -12, -31, 52,  8,   -1,  10,  -10, -19,
  30,  2,   -60, 0,   44,  68,  50,  0,   -2,  -18, 1,   4,   2,   -60, -30,
  -2,  5,   64,  4,   -16, 10,  -22, 47,  -18, -63, -6,  10,  -44, -33, -4,
  0,   2,   8,   -9,  60,  50,  -3,  -20, 38,  38,  2,   8,   -37, 39,  7,
  34,  -74, 28,  -14, 4,   2,   18,  -47, 20,  -36, 53,  -42, 12,  -38, 36,
  -49, 6,   -8,  -14, 8,   -3,  20,  -2,  63,  -14, 24,  45,  40,  10,  -10,
  -24, 34,  -8,  -4,  -70, 10,  -23, 58,  -30, 4,   -58, -29, 1,   4,   73,
  31,  0,   -8,  -60, -32, 10,  -6,  32,  6,   -2,  6,   20,  -22, 40,  44,
  -12, 14,  -30, -24, -4,  -3,  -27, -40, 16,  -18, 84,  -6,  -16, 38,  -40,
  54,  -2,  -12, 4,   -34, 14,  -10, 21,  -58, -10, 15,  -12, 66,  -18, 38,
  35,  -7,  30,  -67, -32, 10,  -24, 62,  26,  -11, 13,  -38, 2,   2,   -9,
  11,  -37, -34, 12,  -14, 58,  48,  -11, 14,  -61, -44, 5,   -9,  37,  12,
  11,  -20, 32,  -41, -14, 24,  -40, 64,  10,  -20, 34,  -61, -4,  8,   -16,
  30
};

static const int32_t mdt4x4_mode9[256] = {
  2,   8,   14,  20,  6,   26,  42,  40,  14,  40,  52,  44,  20,  39,  43,
  38,  16,  43,  30,  -4,  42,  74,  24,  -26, 34,  33,  -12, -31, 2,   -17,
  -28, -20, -4,  -36, -37, -22, 16,  -7,  -42, -44, 33,  52,  3,   -33, 30,
  54,  28,  -6,  46,  36,  -32, -36, 44,  15,  -39, -20, -13, -24, 6,   30,
  -33, -16, 37,  48,  21,  -9,  -6,  48,  56,  -18, -34, 58,  52,  -12, -42,
  20,  18,  2,   -14, -6,  -46, 14,  36,  -36, -21, -2,  -8,  -24, 39,  -18,
  -42, 32,  46,  -4,  -10, 60,  -26, -53, 8,   52,  8,   10,  -2,  -20, 15,
  22,  0,   -26, -45, -52, 18,  56,  -20, 38,  59,  25,  4,   -10, -18, -4,
  -5,  -25, -25, -32, -30, 44,  68,  -16, 66,  11,  7,   47,  -12, -16, 14,
  -28, -32, -12, -10, -40, 53,  16,  -13, 48,  22,  -35, 48,  -32, 54,  -59,
  46,  -27, 20,  -18, 26,  6,   -18, 12,  -14, -2,  0,   46,  35,  20,  -10,
  -46, -60, -12, 6,   46,  53,  14,  0,   -25, -28, -4,  18,  -24, 32,  -14,
  0,   10,  -18, 12,  -50, 54,  -52, 28,  -40, 40,  -36, 19,  -28, -38, 30,
  18,  44,  40,  -35, -22, -54, -29, 26,  26,  46,  -4,  -2,  -20, 59,  -34,
  38,  -20, -38, 5,   -10, 1,   12,  18,  -20, 20,  24,  -50, 54,  -34, 18,
  -4,  -14, 50,  -32, 16,  6,   -64, 34,  -21, -2,  61,  -30, 32,  -14, -24,
  26,  -28, 28,  -20, -34, 40,  -41, 31,  34,  -42, 44,  -33, -20, 28,  -29,
  20
};

static const int32_t mdt4x4_mode10[256] = {
  4,   12,  20,  19,  10,  32,  45,  38,  19,  42,  50,  41,  24,  36,  40,
  34,  21,  33,  14,  -12, 50,  58,  0,   -40, 46,  36,  -20, -40, 20,  2,
  -24, -22, 11,  -34, -50, -20, 27,  -33, -61, -21, 26,  20,  0,   2,   24,
  51,  38,  20,  52,  36,  -18, -24, 50,  18,  -15, -5,  -16, -36, 12,  35,
  -46, -38, 22,  37,  21,  -6,  3,   53,  42,  -24, -16, 68,  44,  -22, -38,
  22,  17,  -8,  -30, -12, -47, 24,  18,  -36, -24, 8,   -14, -16, 32,  -24,
  -36, 46,  45,  -15, -18, 58,  -64, -28, 31,  24,  25,  10,  -14, -6,  36,
  12,  -16, -14, -68, -20, 45,  16,  -6,  -64, -34, -31, 19,  -8,  40,  -7,
  34,  20,  38,  18,  -4,  -48, -48, 6,   6,   -10, -48, 50,  -36, 54,  -40,
  11,  -22, 41,  -10, -8,  10,  -40, -11, 36,  -42, 32,  -44, -40, -10, 31,
  -25, 44,  13,  10,  8,   34,  -22, 7,   3,   -66, -9,  32,  -24, 30,  -16,
  -15, 0,   -16, 47,  -42, 52,  -30, 38,  -45, 41,  -18, 54,  12,  4,   -32,
  -59, -28, 17,  22,  49,  38,  -38, -12, -26, -20, 28,  6,   26,  -43, 56,
  -9,  -4,  15,  -38, -14, -15, 13,  4,   44,  34,  -42, 34,  -48, -4,  46,
  30,  19,  -4,  -52, -46, -18, 6,   50,  46,  20,  -24, -6,  -46, 4,   24,
  -14, -13, 43,  -38, 26,  8,   -56, 38,  -30, -4,  51,  -35, 40,  -14, -19,
  19,  -27, 36,  -28, -26, 36,  -45, 38,  26,  -39, 48,  -40, -14, 23,  -27,
  22
};

static const int32_t mdt4x4_mode11[256] = {
  4,   10,  17,  22,  12,  33,  43,  38,  19,  46,  52,  39,  20,  36,  40,
  33,  18,  50,  38,  -2,  39,  68,  25,  -16, 26,  15,  -18, -22, -8,  -36,
  -38, -20, -28, -44, -14, -10, 11,  6,   -20, -38, 52,  62,  -10, -40, 35,
  40,  -6,  -20, 32,  25,  -36, -49, 42,  18,  -52, -38, 8,   -1,  4,   16,
  -17, 0,   45,  46,  -23, -36, -33, -32, -26, 30,  32,  -30, -32, 29,  58,
  0,   -38, -46, -13, 0,   -32, 37,  52,  -41, -57, 2,   18,  -52, -18, -10,
  -10, -5,  33,  22,  12,  34,  52,  25,  -2,  28,  -1,  -11, 10,  -26, -50,
  15,  28,  -64, -18, 41,  29,  -32, -12, -36, 26,  70,  7,   6,   -3,  -26,
  2,   0,   -22, -33, -24, -32, 26,  68,  -64, 18,  36,  -10, 4,   -1,  -28,
  20,  9,   14,  -2,  -2,  -68, 4,   50,  -42, -5,  -14, 10,  -16, 38,  -36,
  50,  -25, 50,  -61, 41,  -19, 12,  -17, 33,  -17, -14, 56,  -52, 21,  -49,
  1,   -12, 22,  35,  8,   10,  -37, 30,  -48, 30,  0,   20,  22,  41,  8,
  -1,  -70, -32, -20, 20,  47,  46,  19,  -6,  -31, -34, 10,  -64, 26,  -10,
  31,  49,  13,  -34, -10, -40, -26, 46,  -6,  34,  12,  -30, 5,   -26, 35,
  -37, -12, 16,  -36, 44,  14,  16,  8,   -15, -28, -50, 38,  -42, 48,  0,
  16,  -26, 54,  -32, 16,  2,   -60, 38,  -24, 3,   54,  -32, 30,  -12, -23,
  21,  -18, 24,  -14, -36, 36,  -42, 30,  36,  -40, 48,  -38, -24, 28,  -30,
  22
};

static const int32_t mdt4x4_mode12[256] = {
  -1,  7,   21,  24,  -8,  19,  45,  46,  -2,  27,  49,  48,  14,  38,  45,
  40,  16,  21,  -2,  -12, 56,  61,  4,   -24, 53,  62,  14,  -24, 14,  10,
  -9,  -18, -12, -54, -56, -14, 0,   -47, -44, -14, 18,  32,  22,  -4,  18,
  50,  32,  3,   58,  24,  -32, 3,   60,  2,   -48, 22,  -2,  -32, -14, 39,
  -13, -10, 19,  39,  -15, -18, 12,  52,  14,  -22, -12, 65,  48,  6,   -40,
  8,   44,  2,   -42, -14, -1,  -44, -34, 8,   25,  -9,  24,  32,  -2,  16,
  56,  12,  -48, -62, -22, -28, 44,  16,  28,  22,  22,  -42, 20,  8,   7,
  -24, 11,  -26, -28, 41,  36,  -70, -64, -25, 49,  -3,  42,  -4,  -8,  -18,
  39,  -12, -22, 12,  -46, -15, 46,  18,  -22, -18, -13, 48,  -2,  62,  -40,
  28,  -56, 16,  -23, -28, -32, 22,  20,  -22, -40, -8,  8,   -42, 67,  4,
  10,  19,  -51, -38, 22,  -8,  46,  25,  -20, -12, 34,  -48, 18,  52,  28,
  -10, 26,  -34, -20, -4,  4,   -55, 21,  -12, -2,  56,  22,  -62, -10, 8,
  -11, 52,  21,  -34, 20,  -52, -11, 52,  16,  18,  -1,  -32, -26, 32,  8,
  54,  -7,  5,   -50, -32, 12,  -32, 69,  4,   33,  -26, 8,   -16, -15, 12,
  -54, -8,  -12, 18,  34,  32,  30,  -36, -14, -50, 30,  -33, 60,  0,   -31,
  28,  -46, 28,  6,   1,   27,  -10, 26,  -35, 10,  -13, -49, 54,  -48, 32,
  25,  -30, 39,  -40, -28, 27,  -40, 43,  34,  -31, 40,  -42, -18, 14,  -18,
  23
};

static const int32_t mdt8x8_mode0[4096] = {
  2,   2,   3,   4,   4,   4,   4,   6,   4,   6,   8,   10,  10,  10,  11,
  12,  4,   9,   12,  14,  16,  16,  18,  18,  4,   10,  14,  17,  20,  22,
  22,  20,  5,   11,  16,  20,  23,  26,  25,  22,  6,   12,  16,  21,  24,
  26,  25,  22,  6,   12,  16,  20,  23,  24,  24,  22,  7,   12,  15,  18,
  20,  20,  21,  20,  4,   9,   11,  12,  11,  10,  9,   7,   8,   19,  24,
  24,  24,  22,  18,  12,  8,   20,  26,  29,  30,  28,  20,  10,  6,   14,
  20,  23,  24,  20,  12,  4,   4,   6,   8,   8,   6,   3,   -1,  -2,  0,
  -2,  -6,  -9,  -12, -14, -13, -10, -4,  -11, -16, -19, -21, -22, -21, -17,
  -7,  -13, -18, -20, -22, -22, -22, -19, 2,   2,   0,   -2,  -3,  -4,  -8,
  -11, 6,   8,   5,   0,   -4,  -11, -20, -24, 9,   18,  16,  11,  0,   -14,
  -28, -32, 12,  24,  28,  24,  9,   -12, -29, -30, 14,  28,  32,  28,  14,
  -8,  -23, -25, 14,  24,  25,  19,  10,  -2,  -14, -18, 12,  17,  14,  10,
  6,   1,   -8,  -12, 8,   10,  8,   6,   4,   2,   -4,  -8,  2,   7,   10,
  10,  12,  15,  15,  11,  3,   6,   9,   15,  24,  30,  27,  16,  -1,  -8,
  -11, -2,  14,  24,  18,  7,   -4,  -16, -24, -22, -12, -6,  -8,  -8,  0,
  -4,  -8,  -15, -24, -30, -27, -16, 6,   16,  22,  12,  -8,  -22, -22, -13,
  12,  26,  32,  26,  12,  -2,  -8,  -8,  13,  22,  22,  20,  16,  9,   0,
  -6,  7,   13,  14,  14,  10,  4,   0,   -4,  12,  28,  34,  29,  16,  0,
  -8,  -8,  12,  26,  33,  26,  6,   -16, -20, -12, 5,   6,   4,   -2,  -14,
  -26, -22, -10, -2,  -12, -23, -28, -24, -15, -6,  0,   -5,  -15, -25, -24,
  -10, 8,   15,  12,  -5,  -9,  -10, -4,  8,   20,  24,  20,  -4,  -3,  1,
  7,   13,  17,  20,  20,  -2,  -6,  -6,  -2,  7,   8,   2,   -5,  -8,  -22,
  -19, 8,   27,  14,  -10, -18, -16, -36, -22, 21,  40,  10,  -24, -23, -18,
  -27, -4,  24,  22,  -4,  -17, -8,  -10, 0,   18,  8,   -14, -12, 7,   14,
  3,   20,  16,  -14, -30, -6,  24,  22,  9,   14,  -2,  -21, -19, 2,   19,
  16,  4,   -2,  -14, -13, -4,  4,   6,   6,   2,   8,   8,   -4,  -10, -4,
  4,   4,   2,   10,  10,  -2,  -8,  -2,  4,   -2,  -2,  -6,  -3,  5,   12,
  10,  -7,  -18, -11, -32, -26, 13,  40,  22,  -22, -31, -17, -43, -32, 16,
  47,  20,  -24, -25, -16, -26, -14, 12,  22,  6,   -8,  -6,  -6,  -2,  6,
  4,   -4,  -1,  7,   7,   2,   8,   8,   -2,  -8,  0,   8,   6,   -2,  1,
  12,  16,  4,   -16, -20, -14, -8,  -6,  17,  32,  12,  -25, -38, -22, -10,
  -14, 1,   20,  16,  -6,  -18, -12, 0,   -8,  -20, -18, 8,   28,  22,  3,
  8,   6,   -20, -33, -2,  35,  31,  3,   8,   10,  0,   -8,  -2,  10,  2,
  -10, 3,   8,   16,  17,  6,   -12, -23, -20, 2,   6,   14,  18,  8,   -12,
  -22, -18, -4,  -5,  3,   16,  22,  16,  8,   6,   -14, -22, -2,  26,  26,
  10,  6,   12,  -22, -30, -4,  16,  -2,  -20, -4,  11,  -17, -15, 6,   6,
  -19, -26, -8,  0,   -5,  2,   10,  10,  8,   7,   -6,  -17, 1,   -4,  -6,
  12,  40,  36,  -5,  -26, -4,  -18, -24, 2,   32,  28,  -7,  -22, -10, -20,
  -20, -6,  6,   2,   -8,  -12, -6,  -10, -2,  10,  13,  4,   -4,  -6,  -2,
  -12, -17, 0,   26,  23,  -6,  -24, 12,  8,   -21, -27, 15,  38,  -1,  -34,
  21,  30,  -6,  -37, -4,  30,  -1,  -28, 14,  22,  4,   -11, 0,   7,   -6,
  -10, -4,  -13, -2,  16,  12,  -4,  -2,  6,   -18, -32, -13, 14,  10,  2,
  8,   13,  -16, -22, -14, -4,  0,   7,   12,  10,  18,  29,  19,  12,  17,
  14,  0,   -8,  27,  39,  13,  -2,  12,  12,  -12, -18, 14,  14,  -14, -28,
  -12, -6,  -18, -14, -10, -16, -16, -17, -18, -15, 0,   12,  -19, -18, 12,
  24,  2,   -3,  22,  30,  -12, -2,  26,  33,  13,  6,   16,  18,  -4,  4,
  7,   2,   -2,  -4,  -7,  -6,  0,   -2,  -13, -20, -16, -14, -18, -18, 0,
  9,   20,  14,  -2,  -2,  16,  20,  -4,  5,   22,  13,  -15, -10, 21,  26,
  -4,  -9,  -6,  -9,  -20, -14, 2,   2,   8,   1,   -23, -24, 0,   2,   -19,
  -22, 26,  32,  -4,  -16, 16,  22,  -6,  -15, 27,  39,  16,  -6,  2,   20,
  20,  10,  10,  12,  4,   -12, -24, -4,  20,  19,  -6,  -13, -13, -19, -29,
  -19, 2,   10,  10,  4,   -20, -20, 9,   24,  8,   -7,  20,  16,  -26, -34,
  10,  36,  8,   -13, 12,  16,  -4,  -15, 2,   12,  -2,  -10, -2,  1,   4,
  2,   -3,  0,   -1,  -9,  1,   -2,  -14, -18, 0,   26,  14,  -17, 18,  13,
  -23, -38, 5,   42,  14,  -22, 22,  23,  -6,  -19, 2,   18,  -1,  -17, 12,
  16,  11,  6,   -2,  -9,  -11, -9,  -10, -14, -8,  -2,  8,   18,  9,   0,
  -4,  -14, -16, 2,   16,  8,   -4,  4,   19,  6,   -18, 4,   17,  -20, -24,
  18,  40,  20,  -28, 4,   24,  -32, -25, 34,  34,  8,   -32, 5,   28,  -16,
  -9,  30,  7,   -10, -15, 5,   10,  0,   2,   10,  -8,  -6,  10,  4,   -11,
  -4,  -2,  -8,  -1,  11,  18,  3,   -10, -9,  -10, -11, 14,  25,  17,  -8,
  -26, -22, -6,  3,   22,  25,  3,   -13, -16, -14, -4,  9,   20,  -2,  -33,
  -6,  26,  6,   -4,  14,  14,  -11, -30, 7,   30,  2,   -4,  14,  11,  12,
  6,   1,   -8,  -10, -4,  -2,  6,   16,  10,  -12, -14, 6,   -4,  -20, -6,
  -12, -17, -7,  21,  28,  -3,  -22, -14, -28, -26, 4,   32,  26,  2,   -6,
  -12, -16, 9,   32,  14,  -17, -26, -12, -6,  -11, 4,   22,  14,  -13, -22,
  -3,  12,  14,  -10, -19, -2,  8,   11,  16,  14,  12,  -10, -14, -3,  6,
  15,  13,  -4,  -14, 1,   18,  6,   -8,  -10, -12, -6,  -6,  4,   -3,  -2,
  7,   -9,  -26, 16,  28,  -5,  -42, -15, 26,  14,  -12, 28,  31,  -10, -34,
  -11, 20,  22,  8,   -2,  -15, -10, 8,   2,   -8,  10,  28,  17,  -6,  -26,
  10,  14,  -22, 2,   42,  34,  18,  -22, 4,   20,  -23, -17, 16,  12,  14,
  5,   -3,  1,   1,   -12, -22, -28, -14, 23,  -4,  -20, 23,  15,  -28, -32,
  -19, 18,  2,   -17, 12,  20,  -4,  -8,  -2,  6,   8,   0,   -12, -2,  8,
  8,   8,   0,   8,   7,   -16, -16, 2,   -27, -24, 12,  6,   -22, -1,  28,
  13,  -36, -18, 29,  0,   -30, 12,  26,  -3,  -9,  13,  18,  -12, -4,  18,
  -9,  -26, 10,  13,  -4,  -6,  10,  1,   -14, -12, 0,   -11, -2,  7,   -11,
  -8,  20,  14,  -13, -13, 10,  2,   -16, 12,  30,  4,   -6,  3,   5,   -9,
  6,   26,  -2,  -28, 4,   8,   -4,  -4,  16,  14,  -22, -36, -2,  8,   8,
  -14, -6,  20,  -2,  -32, -12, -2,  13,  -8,  -6,  22,  2,   -27, -4,  -8,
  2,   11,  -2,  -8,  10,  15,  12,  2,   -8,  7,   0,   -14, 9,   18,  -2,
  6,   8,   -6,  -6,  12,  2,   -26, -35, -6,  36,  -2,  -20, 22,  7,   -39,
  -40, -14, 34,  5,   -26, 4,   18,  -6,  -17, -6,  10,  3,   -16, -9,  16,
  18,  0,   -23, -44, -28, -10, -22, -25, -8,  10,  0,   -14, 2,   7,   -8,
  -6,  5,   6,   18,  30,  23,  10,  12,  15,  11,  -6,  -8,  -4,  -11, -6,
  0,   -5,  -2,  -4,  -16, -26, -17, -6,  -14, -13, -3,  8,   14,  20,  24,
  10,  8,   16,  6,   0,   10,  25,  16,  4,   22,  20,  -5,  -16, -25, -24,
  -29, -20, -2,  -12, -26, -36, -26, 12,  -6,  -17, 8,   2,   -17, -22, -2,
  17,  -8,  -6,  13,  0,   -17, 26,  17,  -6,  10,  9,   -4,  8,   0,   28,
  -16, -24, 19,  -8,  -16, 18,  -2,  0,   -23, -2,  6,   -15, 0,   8,   -12,
  5,   14,  8,   0,   16,  5,   -14, 6,   22,  16,  -18, 6,   28,  -20, -18,
  30,  12,  -16, -30, 5,   2,   -30, -5,  26,  4,   22,  24,  -18, -50, -24,
  2,   -6,  -3,  -2,  5,   0,   -8,  0,   5,   -3,  -4,  -15, -16, 13,  38,
  17,  -4,  4,   -5,  16,  12,  -14, -10, -8,  -10, 10,  -8,  15,  18,  -18,
  -23, -10, -7,  7,   -4,  -18, -16, 12,  30,  16,  0,   2,   10,  -4,  -12,
  6,   12,  6,   6,   3,   20,  32,  18,  -19, -42, -22, 0,   0,   20,  20,
  -14, -32, 2,   34,  12,  -16, 2,   -3,  2,   0,   -7,  4,   7,   -4,  -8,
  -15, 8,   25,  -6,  -26, -3,  9,   16,  12,  -14, -14, 6,   12,  4,   -7,
  13,  10,  -8,  -15, 0,   19,  8,   -12, -10, -18, 10,  23,  -8,  -20, -3,
  8,   10,  0,   -15, -2,  8,   -5,  -8,  8,   39,  27,  -36, -38, 22,  30,
  -4,  -8,  -19, -15, 0,   -9,  -12, 20,  39,  22,  -7,  4,   -1,  -6,  2,
  -1,  -4,  3,   3,   22,  7,   -2,  16,  -16, -40, -5,  -20, 4,   9,   -19,
  4,   12,  -1,  24,  -28, -4,  3,   -25, 4,   18,  2,   22,  0,   18,  8,
  0,   10,  -10, -35, -17, 10,  11,  6,   6,   -4,  -4,  -8,  -18, -12, -18,
  -7,  -15, -18, 26,  43,  12,  -25, 4,   13,  -8,  16,  8,   -32, -18, -30,
  12,  14,  -19, 9,   9,   -16, 8,   -14, 12,  0,   -16, 0,   0,   3,   30,
  -16, 12,  2,   -13, 18,  4,   -29, 9,   -34, 14,  16,  -24, 20,  13,  -41,
  6,   -24, 10,  8,   -22, 0,   6,   -2,  28,  6,   0,   -10, 3,   4,   -4,
  6,   12,  13,  -4,  -8,  15,  16,  -2,  -20, -24, 20,  -14, -12, 20,  -5,
  -6,  8,   -20, 8,   -8,  3,   9,   -12, 6,   6,   -14, -26, 12,  16,  -24,
  10,  10,  -18, 24,  -32, 13,  2,   -22, 26,  -4,  -27, 30,  0,   -6,  -6,
  10,  -1,  -3,  4,   -14, 27,  -12, -2,  22,  -22, 2,   20,  -29, 22,  -6,
  -10, 14,  2,   -14, 0,   10,  4,   -4,  -16, 6,   18,  -23, -13, 36,  -4,
  12,  -1,  -18, 4,   2,   -12, 21,  -34, 20,  13,  -34, 20,  6,   -36, 36,
  -41, 10,  14,  -22, 23,  7,   -30, 20,  1,   -2,  -2,  4,   -7,  0,   8,
  -14, 32,  -6,  -8,  18,  -20, -6,  22,  -22, 8,   -4,  0,   7,   2,   -2,
  -2,  0,   -20, 4,   8,   -12, 8,   2,   -14, 14,  -14, 9,   7,   -15, -4,
  4,   -2,  12,  26,  4,   -26, 2,   5,   -24, 0,   36,  5,   -5,  -2,  3,
  0,   2,   0,   -1,  -15, -5,  17,  2,   -6,  19,  -2,  -28, 6,   9,   -10,
  -1,  3,   -10, -4,  14,  0,   12,  -9,  -11, 10,  -6,  -12, 27,  -38, 6,
  24,  -21, 10,  24,  -27, -2,  -24, 9,   12,  -16, 12,  8,   -27, 10,  20,
  10,  -24, -2,  12,  -26, -11, 38,  9,   -8,  13,  18,  -13, 10,  12,  -38,
  18,  -16, -10, 12,  -12, -3,  15,  -10, 2,   4,   -8,  -6,  8,   -8,  0,
  18,  -16, 12,  12,  -4,  7,   4,   -6,  -7,  -3,  -4,  -3,  -1,  -4,  4,
  -2,  -9,  0,   10,  -4,  -13, 10,  0,   -18, 27,  -32, 27,  22,  -28, 22,
  11,  -34, 28,  -46, 9,   14,  -28, 8,   14,  -22, 2,   -53, 6,   8,   -10,
  28,  -4,  -28, 14,  -2,  16,  -2,  -10, -5,  0,   10,  1,   28,  -10, -4,
  15,  -13, 3,   12,  -15, -12, -12, 6,   2,   12,  -2,  -18, 6,   -10, 16,
  0,   -16, 0,   -2,  7,   11,  18,  -4,  -7,  16,  -11, -1,  15,  -20, -2,
  -12, 6,   8,   4,   3,   -22, -5,  -19, 26,  10,  -42, 10,  8,   -22, 44,
  -7,  -40, -36, -16, -16, -6,  -10, -24, 19,  16,  24,  18,  3,   10,  9,
  11,  7,   4,   11,  3,   2,   8,   -7,  11,  -13, -32, -27, -20, -13, -3,
  -17, -12, 6,   18,  23,  12,  3,   10,  10,  6,   1,   10,  12,  2,   10,
  4,   -4,  10,  -18, -29, -28, -28, -12, -12, -22, -10, 9,   18,  27,  14,
  2,   12,  16,  5,   -2,  -34, -10, 44,  26,  2,   12,  2,   10,  25,  -2,
  -21, -20, -12, 2,   -12, -16, 13,  -5,  -8,  4,   -10, 4,   -1,  -16, -18,
  -8,  30,  26,  0,   11,  4,   18,  18,  4,   -20, -22, -2,  -3,  -8,  -4,
  2,   4,   -10, 0,   -2,  -6,  4,   -20, -22, -4,  27,  27,  6,   13,  8,
  24,  24,  -3,  -20, -29, -5,  12,  -22, -4,  -11, 26,  26,  -29, -40, -12,
  6,   14,  -2,  -11, -14, 14,  36,  3,   -3,  3,   -8,  4,   -5,  0,   9,
  -7,  8,   -1,  -12, 24,  17,  -25, -28, -13, 8,   18,  0,   -14, -11, 13,
  32,  4,   -6,  0,   0,   -2,  0,   1,   4,   1,   4,   -9,  -2,  18,  15,
  -20, -33, -8,  4,   18,  1,   -26, -15, 19,  34,  8,   -16, -4,  5,   -8,
  -8,  -12, -22, 2,   4,   -22, 24,  -13, 8,   23,  -12, 25,  -15, -33, 36,
  -24, 4,   22,  -30, 36,  -24, -30, 29,  -22, -4,  6,   -39, 26,  -11, -12,
  12,  -7,  4,   18,  -2,  12,  -5,  2,   2,   -2,  3,   3,   -2,  6,   -2,
  -2,  4,   -5,  -6,  -11, -16, 2,   0,   -10, 8,   -2,  0,   16,  8,   4,
  -4,  28,  13,  -7,  12,  26,  -10, -43, -23, -15, -15, 2,   -6,  -14, 8,
  28,  20,  -8,  2,   -1,  -4,  2,   0,   6,   0,   18,  16,  -6,  10,  21,
  -16, -28, -22, -8,  -13, 2,   -6,  -14, 8,   26,  16,  -6,  -2,  2,   -4,
  2,   4,   2,   5,   16,  13,  0,   14,  16,  -16, -30, -26, -8,  -14, 1,
  -2,  -28, 12,  43,  6,   4,   -14, 16,  2,   -6,  16,  -14, 9,   27,  -26,
  15,  -6,  -17, 23,  -28, 18,  16,  -9,  6,   0,   -3,  9,   -9,  4,   -28,
  26,  -16, 5,   16,  -24, 30,  -21, -37, 36,  -26, -2,  18,  -32, 31,  -20,
  -8,  8,   -4,  0,   7,   -6,  2,   2,   12,  -16, 10,  3,   -6,  10,  -8,
  7,   13,  -8,  1,   1,   -8,  6,   0,   -2,  10,  -18, 17,  -8,  -9,  22,
  -24, 16,  17,  -16, 10,  -2,  -6,  10,  -16, 11,  -6,  10,  -10, 5,   4,
  -13, 16,  -15, -18, 12,  -8,  2,   3,   -8,  12,  -10, 18,  -23, 16,  -3,
  -12, 21,  -27, 21,  44,  -40, 26,  0,   -22, 33,  -31, 20,  15,  -19, 12,
  2,   -14, 13,  -6,  -2,  -10, 8,   -4,  -1,  5,   -6,  4,   0,   -27, 4,
  28,  2,   -10, 18,  6,   -44, 8,   8,   -30, -4,  10,  -22, 10,  24,  -10,
  8,   0,   0,   7,   -4,  2,   4,   -20, -2,  18,  0,   -8,  16,  -4,  -32,
  20,  2,   -22, 2,   4,   -16, 6,   24,  -4,  2,   4,   0,   2,   0,   2,
  5,   -17, -8,  18,  0,   -8,  16,  -7,  -33, 40,  -8,  -26, 15,  4,   -22,
  6,   28,  10,  -23, 18,  -10, -11, 24,  -23, 14,  20,  -14, 14,  -3,  -4,
  10,  -15, 12,  -2,  0,   -2,  2,   1,   -5,  10,  -8,  -9,  4,   1,   -2,
  1,   3,   -2,  -2,  8,   -2,  2,   -2,  0,   2,   -8,  13,  -10, 14,  -14,
  3,   8,   -18, 24,  -14, -38, 40,  -24, 4,   22,  -32, 34,  -28, -25, 32,
  -20, 0,   16,  -24, 16,  2,   12,  18,  20,  24,  16,  12,  14,  14,  -14,
  -22, -30, -28, -23, -18, -20, -16, 6,   20,  20,  26,  14,  19,  14,  10,
  0,   -4,  -10, -2,  -6,  -3,  -6,  1,   -8,  -10, -12, -14, -12, -8,  -12,
  -8,  11,  20,  26,  24,  23,  18,  18,  11,  -8,  -18, -28, -24, -21, -23,
  -12, -12, -2,  12,  13,  10,  14,  10,  6,   2,   -49, 34,  -3,  -19, 20,
  -13, -4,  12,  18,  -7,  -11, 14,  -8,  0,   12,  -14, 14,  -12, 12,  0,
  -6,  8,   -9,  6,   -25, 14,  2,   -16, 14,  -6,  -6,  12,  11,  -3,  -11,
  16,  -10, 0,   14,  -18, 14,  -10, 10,  2,   -9,  12,  -14, 8,   -20, 10,
  0,   -15, 15,  -7,  -6,  18,  2,   10,  -20, 23,  -4,  -22, 45,  -40, -4,
  8,   -27, 20,  4,   -18, 34,  -33, -13, 15,  9,   -12, 0,   -2,  -11, 17,
  12,  -22, 4,   -2,  -2,  18,  -16, 12,  10,  4,   -6,  14,  -10, -6,  17,
  -20, -21, 20,  -4,  -8,  6,   -5,  -5,  9,   8,   -20, 2,   2,   -2,  16,
  -15, 14,  18,  5,   2,   10,  -12, -7,  14,  -18, -44, 34,  -23, -8,  28,
  -25, 18,  -3,  -7,  -18, -18, -4,  26,  26,  -4,  3,   10,  22,  26,  1,
  -36, -28, -2,  -1,  -5,  -17, -24, 2,   30,  20,  8,   -6,  -2,  5,   14,
  -6,  -6,  -8,  -4,  6,   11,  6,   12,  -2,  -13, -10, -1,  -2,  -9,  -20,
  -27, 4,   32,  22,  5,   -5,  0,   26,  28,  -5,  -33, -24, -6,  9,   9,
  -24, -17, 7,   14,  20,  -2,  -4,  -13, -19, 10,  28,  8,   -18, -17, 4,
  21,  22,  -11, -37, -8,  24,  18,  -2,  -20, -18, 7,   32,  7,   -22, -12,
  0,   5,   11,  -7,  -11, -2,  9,   1,   0,   8,   7,   -4,  -11, -4,  9,
  7,   2,   -18, -22, 12,  32,  8,   -24, -14, -1,  20,  22,  -11, -38, -4,
  23,  15,  0,   -13, -18, 13,  23,  4,   -15, -9,  2,   -16, -14, 3,   -5,
  -13, 0,   30,  20,  25,  16,  1,   -3,  22,  -8,  -34, -29, -18, -24, 11,
  -8,  -8,  -2,  36,  22,  9,   7,   0,   -5,  10,  -6,  -8,  -11, 9,   6,
  0,   4,   5,   -2,  -14, -10, -20, -18, 4,   -4,  -18, 8,   32,  26,  24,
  16,  -2,  2,   20,  -6,  -36, -26, -10, -13, 8,   -4,  -16, 5,   18,  14,
  2,   -2,  10,  -8,  14,  -10, 8,   -14, 12,  -22, 19,  -29, 22,  -22, 14,
  6,   17,  -24, 39,  -34, 34,  -22, 14,  -17, 12,  -21, 24,  -30, 28,  -26,
  20,  -6,  9,   -15, 14,  -20, 18,  -12, 6,   4,   4,   -4,  17,  -10, 11,
  -2,  -2,  -10, 4,   -10, 0,   -11, 6,   -12, 12,  6,   4,   -2,  10,  -6,
  8,   -2,  -4,  -4,  -15, -6,  21,  -4,  -10, 20,  0,   -23, 24,  7,   -28,
  8,   8,   -24, -2,  32,  -29, 4,   12,  7,   -20, 31,  -6,  -26, 8,   4,
  -18, 12,  -7,  0,   -8,  14,  8,   2,   -2,  0,   6,   -12, 7,   10,  -18,
  -12, 26,  -16, 2,   14,  2,   -34, 30,  -1,  -15, 4,   10,  -25, 3,   36,
  -21, 3,   12,  -9,  -1,  14,  0,   -21, -10, 10,  -12, 22,  -25, 26,  -18,
  4,   -6,  18,  -28, 22,  -19, 11,  -8,  11,  -5,  -6,  16,  -12, 12,  -7,
  8,   -10, 20,  -24, 24,  -26, 24,  -22, 16,  -6,  3,   2,   -4,  2,   0,
  0,   -2,  2,   -24, 24,  -21, 30,  -30, 26,  -20, 4,   0,   12,  -29, 23,
  -22, 16,  -10, 12,  -10, 10,  -2,  6,   -5,  2,   -2,  -4,  36,  -37, 26,
  -10, -8,  17,  -18, 16,  -24, 18,  -5,  -6,  16,  -18, 16,  -16, 4,   0,
  -6,  4,   -2,  -2,  6,   2,   17,  -23, 20,  -9,  -5,  15,  -22, 12,  -15,
  16,  -8,  -4,  15,  -18, 20,  -12, 4,   -3,  -4,  4,   -4,  -2,  3,   -2,
  13,  -18, 20,  -11, -3,  18,  -24, 17,  -14, 20,  -18, 4,   14,  -29, 34,
  -22, 6,   -13, 15,  -14, 14,  -7,  4,   -8,  12,  -16, 22,  -24, 26,  -26,
  18,  0,   6,   -12, 16,  -17, 14,  -10, 7,   -12, -4,  12,  -14, 18,  -15,
  14,  -10, 8,   -18, 26,  -38, 36,  -38, 26,  -18, 11,  -14, 22,  -20, 28,
  -22, 24,  -14, -2,  0,   2,   -11, 8,   -9,  2,   -2,  8,   0,   1,   2,
  2,   -4,  6,   -4,  -4,  -20, 13,  -2,  -4,  -4,  16,  -26, 24,  21,  -7,
  -12, 24,  -16, -3,  20,  -24, -22, 6,   16,  -27, 20,  -6,  -9,  16,  18,
  -8,  -6,  10,  -8,  4,   -1,  -4,  -4,  6,   -8,  16,  -18, 8,   4,   -8,
  -20, 12,  2,   -20, 24,  -8,  -14, 20,  33,  -30, 18,  -1,  -2,  -10, 26,
  -26, -10, 3,   12,  -27, 30,  -17, 0,   7,   3,   10,  -22, 28,  -26, 17,
  -3,  -5,  -22, 15,  -5,  0,   -3,  10,  -20, 19,  19,  -11, 2,   2,   2,
  -8,  16,  -16, -6,  2,   4,   -6,  4,   -1,  -3,  4,   -10, 15,  -15, 14,
  -12, 15,  -16, 14,  8,   -4,  -6,  10,  -10, 2,   10,  -14, -2,  -10, 28,
  -38, 39,  -26, 8,   6,   24,  -31, 28,  -25, 20,  -18, 20,  -14, 6,   10,
  8,   8,   8,   5,   8,   6,   -10, -18, -14, -18, -12, -13, -14, -12, 16,
  20,  25,  20,  19,  16,  20,  15,  -18, -23, -30, -24, -22, -20, -24, -18,
  14,  24,  24,  27,  16,  23,  22,  17,  -12, -19, -22, -20, -16, -16, -21,
  -12, 7,   14,  12,  16,  8,   13,  13,  7,   -3,  -4,  -6,  -4,  -6,  -2,
  -6,  -2,  -10, 16,  -27, 30,  -35, 28,  -14, 10,  -4,  8,   2,   -2,  12,
  -9,  -2,  -6,  11,  -24, 17,  -22, 12,  -12, 22,  -4,  2,   12,  -6,  14,
  -6,  8,   -22, 2,   -16, 4,   -10, 2,   -10, 8,   9,   6,   21,  -14, 22,
  -17, 25,  -23, 6,   -14, -4,  -4,  1,   -4,  -4,  7,   0,   8,   -12, 24,
  -32, 36,  -30, 24,  -19, 5,   4,   8,   -7,  10,  3,   4,   -20, 0,   -11,
  -6,  1,   -7,  -18, 5,   26,  6,   19,  8,   0,   6,   30,  -16, -28, -14,
  -21, -12, 4,   -11, -32, 18,  33,  18,  20,  17,  -12, 19,  25,  -14, -36,
  -15, -16, -16, 16,  -21, -16, 8,   34,  11,  17,  4,   -4,  8,   18,  -10,
  -20, -8,  -12, 6,   -6,  5,   -18, 12,  3,   6,   0,   9,   10,  2,   -14,
  -5,  -4,  -5,  -2,  -14, -20, 0,   22,  10,  6,   10,  2,   18,  33,  -6,
  -26, -18, -8,  -14, 1,   -26, -36, 4,   32,  17,  12,  16,  -4,  28,  37,
  -5,  -31, -16, -13, -15, 4,   -25, -32, 6,   26,  12,  12,  11,  -4,  18,
  22,  -3,  -18, -6,  -9,  -6,  0,   -6,  -14, 6,   4,   4,   2,   3,   -6,
  -11, 6,   13,  1,   -6,  -2,  2,   11,  19,  -10, -23, -4,  12,  4,   -4,
  -19, -24, 14,  34,  4,   -17, -4,  6,   26,  26,  -16, -40, -3,  20,  5,
  -7,  -28, -25, 16,  40,  2,   -22, -4,  7,   25,  22,  -16, -33, -2,  20,
  2,   -6,  -18, -15, 12,  23,  1,   -14, 0,   4,   8,   8,   -7,  -10, 0,
  8,   0,   -2,  -20, 16,  -12, 8,   6,   -2,  10,  -15, 30,  -20, 14,  -9,
  -12, 0,   -14, 25,  -29, 12,  -4,  2,   20,  2,   12,  -30, 22,  0,   -10,
  4,   -20, -12, -2,  26,  -12, -12, 18,  -7,  13,  25,  -14, -14, 2,   20,
  -22, 8,   -4,  -34, 27,  2,   3,   -18, 18,  -4,  -4,  32,  -30, 6,   -2,
  11,  -11, 4,   4,   -20, 20,  -6,  -9,  18,  -16, 6,   0,   -18, 11,  2,
  8,   -23, 20,  -6,  0,   30,  -18, -6,  0,   21,  -18, 3,   0,   -38, 20,
  14,  -12, -11, 12,  -1,  4,   36,  -14, -24, 22,  -1,  -6,  0,   -10, -27,
  3,   32,  -28, 10,  0,   -1,  15,  14,  8,   -34, 24,  -12, 3,   2,   -16,
  -2,  -12, 28,  -14, 10,  -4,  0,   9,   -2,  10,  -14, 11,  -17, 22,  -24,
  24,  -22, 20,  -12, -10, 14,  -18, 19,  -22, 22,  -22, 17,  0,   2,   -4,
  6,   -2,  -2,  10,  -12, 5,   -12, 18,  -23, 22,  -16, 3,   5,   0,   8,
  -18, 24,  -26, 21,  -8,  0,   -9,  6,   2,   -7,  12,  -11, 2,   2,   20,
  -26, 24,  -21, 15,  -12, 12,  -8,  -16, 24,  -26, 26,  -22, 18,  -16, 8,
  -4,  -2,  10,  -14, 14,  -6,  -2,  8,   12,  -3,  -11, 20,  -18, 6,   6,
  -16, -24, 12,  7,   -19, 16,  -2,  -14, 27,  32,  -20, -2,  18,  -14, -2,
  20,  -34, -34, 22,  0,   -17, 14,  1,   -20, 35,  28,  -18, -4,  19,  -17,
  4,   14,  -28, -16, 8,   8,   -20, 18,  -9,  -4,  16,  6,   -2,  -6,  14,
  -14, 10,  -2,  -5,  -8,  10,  -8,  4,   1,   -4,  6,   -6,  16,  -19, 15,
  -8,  -2,  8,   -13, 12,  -23, 26,  -20, 9,   6,   -13, 21,  -18, 26,  -30,
  22,  -10, -8,  17,  -26, 23,  -25, 28,  -19, 6,   12,  -20, 29,  -24, 20,
  -22, 14,  -3,  -12, 20,  -27, 22,  -13, 14,  -8,  1,   10,  -15, 20,  -16,
  6,   -6,  4,   0,   -6,  8,   -10, 8,   -8,  12,  -16, 18,  -18, 16,  -12,
  7,   12,  -18, 24,  -27, 28,  -25, 20,  -12, -10, 16,  -20, 24,  -26, 24,
  -19, 12,  2,   -6,  8,   -12, 14,  -14, 12,  -9,  6,   -8,  8,   -6,  4,
  -1,  -2,  2,   -13, 18,  -22, 21,  -18, 14,  -9,  4,   14,  -22, 26,  -26,
  25,  -20, 14,  -6,  -8,  14,  -18, 18,  -18, 14,  -11, 6,   3,   -4,  6,
  -6,  6,   -5,  4,   -2,  -7,  10,  -13, 14,  -13, 11,  -9,  5,   10,  -15,
  19,  -20, 20,  -18, 14,  -8,  -13, 20,  -25, 27,  -26, 24,  -19, 10,  14,
  -20, 26,  -28, 28,  -26, 20,  -12, -12, 18,  -23, 26,  -25, 23,  -18, 10,
  8,   -14, 17,  -20, 19,  -18, 14,  -8,  -4,  6,   -8,  10,  -10, 9,   -8,
  4
};

static const int32_t mdt8x8_mode1[4096] = {
  10,  6,   3,   1,   1,   2,   0,   0,   27,  16,  6,   2,   1,   0,   0,
  0,   38,  26,  6,   4,   1,   1,   0,   0,   42,  28,  6,   4,   2,   0,
  0,   0,   44,  28,  8,   5,   4,   1,   0,   0,   45,  27,  9,   4,   5,
  2,   0,   0,   41,  26,  7,   2,   3,   2,   0,   0,   38,  27,  10,  4,
  3,   1,   0,   0,   -3,  12,  10,  3,   0,   2,   0,   0,   -16, 21,  24,
  6,   0,   0,   0,   0,   -28, 20,  30,  10,  -1,  0,   0,   0,   -30, 18,
  33,  11,  -1,  0,   0,   0,   -26, 24,  36,  12,  2,   0,   0,   0,   -20,
  26,  37,  14,  3,   1,   0,   0,   -20, 26,  36,  14,  2,   2,   0,   0,
  -16, 24,  34,  15,  2,   2,   0,   0,   0,   6,   -10, -10, -1,  -3,  0,
  0,   -10, 11,  -18, -22, -1,  2,   0,   -1,  -18, 8,   -20, -33, -2,  2,
  0,   0,   -20, 14,  -14, -36, -6,  3,   0,   0,   -18, 25,  -15, -38, -14,
  3,   1,   0,   -9,  36,  -11, -35, -19, -1,  3,   -1,  6,   40,  -3,  -30,
  -16, -2,  4,   0,   6,   32,  -8,  -30, -15, 0,   2,   0,   15,  14,  -2,
  -2,  1,   0,   0,   0,   36,  30,  -2,  -6,  2,   2,   0,   0,   46,  44,
  -2,  -10, 2,   2,   1,   0,   28,  35,  -3,  -9,  2,   2,   1,   0,   -4,
  14,  -4,  -7,  2,   2,   1,   0,   -31, -4,  -4,  -6,  2,   1,   0,   0,
  -50, -18, -5,  -7,  -2,  0,   0,   0,   -52, -20, -4,  -6,  -3,  0,   1,
  0,   -26, 1,   4,   -3,  1,   6,   -2,  0,   -58, 8,   17,  -1,  -1,  0,
  -2,  0,   -42, 26,  22,  6,   -2,  0,   0,   -1,  4,   37,  0,   6,   6,
  0,   0,   -2,  30,  34,  -12, 2,   18,  1,   -1,  -2,  18,  6,   -24, -7,
  21,  8,   -3,  -2,  -6,  -24, -38, -14, 10,  8,   -2,  -2,  -6,  -18, -24,
  -4,  9,   1,   -2,  -2,  18,  22,  15,  -4,  -4,  -2,  0,   -2,  24,  31,
  25,  -8,  -12, 2,   0,   -4,  -4,  21,  36,  -9,  -19, 0,   -2,  -2,  -29,
  2,   40,  -6,  -22, 0,   -2,  -2,  -20, -16, 18,  -10, -22, 1,   0,   -3,
  14,  -25, -9,  -10, -22, -4,  0,   -4,  32,  -26, -18, -6,  -18, -6,  0,
  -6,  28,  -27, -18, -10, -18, -4,  0,   -5,  -18, -19, 0,   -5,  -8,  -6,
  0,   -2,  -24, -34, 2,   -8,  -14, -4,  0,   -3,  1,   -20, 10,  -12, -18,
  -3,  -2,  -1,  32,  7,   18,  -15, -24, -1,  -2,  0,   40,  9,   16,  -16,
  -31, -2,  -1,  -2,  18,  -2,  20,  -9,  -36, -7,  0,   -2,  -10, -12, 28,
  0,   -31, -10, 0,   -2,  -30, -22, 22,  0,   -29, -10, 0,   -1,  -44, -24,
  -11, -10, -2,  0,   0,   0,   -31, -16, -4,  -12, -6,  0,   0,   1,   28,
  29,  8,   -8,  -4,  0,   0,   2,   26,  30,  5,   -4,  0,   0,   0,   4,
  -30, -16, 2,   0,   2,   0,   -2,  3,   -49, -33, 6,   -3,  2,   2,   -1,
  4,   5,   -12, 7,   -2,  -1,  2,   0,   4,   58,  20,  9,   4,   -2,  -2,
  0,   4,   -2,  -15, -8,  10,  10,  -4,  0,   0,   8,   -33, -34, 4,   17,
  3,   0,   0,   12,  -16, -26, -8,  12,  4,   -1,  0,   -13, 28,  26,  -4,
  1,   2,   0,   0,   -28, 44,  44,  2,   -6,  2,   2,   0,   -4,  28,  16,
  6,   -2,  -2,  2,   -1,  20,  -12, -17, 11,  12,  0,   0,   0,   8,   -45,
  -32, 8,   13,  4,   0,   0,   0,   -27, 4,   10,  -10, -1,  0,   -4,  14,
  -30, 16,  26,  -16, -7,  0,   -6,  21,  -16, 22,  38,  -16, -12, 0,   -7,
  8,   -2,  18,  37,  -10, -13, 0,   -8,  -11, 7,   6,   14,  -8,  -10, 0,
  -8,  -16, 15,  -13, -13, -8,  -4,  -2,  -8,  -18, 25,  -36, -31, -7,  -2,
  -4,  -8,  -8,  32,  -28, -30, -8,  -6,  -6,  -8,  22,  -34, -45, -12, -5,
  -1,  -6,  -6,  22,  -18, -40, -16, -14, -12, -8,  -6,  -16, 26,  6,   0,
  -18, -16, -8,  -6,  -32, 25,  10,  6,   -10, -17, -8,  -5,  -2,  2,   -14,
  6,   4,   -15, -10, -6,  22,  -14, -26, 2,   9,   -10, -12, -6,  1,   -6,
  -4,  9,   4,   -12, -15, -5,  -12, 16,  32,  27,  8,   -19, -15, -4,  24,
  38,  -8,  -11, -3,  0,   -4,  -6,  -10, 25,  -22, -19, -9,  -8,  -7,  -8,
  -24, -12, -24, -4,  -15, -14, -8,  -8,  20,  -8,  -16, 18,  -12, -20, -7,
  -8,  22,  16,  15,  30,  -8,  -22, -6,  -8,  -28, 2,   24,  18,  -12, -16,
  -6,  -8,  -28, -13, -6,  -1,  -13, -12, -8,  -8,  39,  6,   -22, 2,   1,
  -14, -11, -8,  11,  -10, -20, -22, 10,  18,  -2,  -4,  10,  -6,  -18, -36,
  5,   16,  -4,  -6,  -6,  -5,  10,  -12, 2,   14,  -4,  -5,  -1,  -18, 19,
  12,  11,  7,   -2,  -3,  14,  -12, 36,  12,  23,  13,  -2,  -4,  9,   -11,
  26,  -23, 21,  32,  -4,  -6,  -10, -12, 10,  -49, 3,   35,  -4,  -6,  0,
  4,   9,   -34, 4,   22,  -2,  -4,  -2,  0,   -18, 8,   8,   2,   4,   6,
  0,   10,  -20, 19,  15,  -6,  6,   9,   -4,  16,  -12, 37,  20,  -6,  6,
  12,  -16, 8,   -16, 36,  21,  -8,  6,   15,  -8,  12,  -8,  18,  9,   -6,
  8,   14,  8,   2,   4,   -10, -14, 2,   10,  13,  10,  -20, 12,  -25, -48,
  -2,  17,  12,  8,   -18, 22,  -12, -48, -13, 16,  12,  22,  -8,  -14, -1,
  -2,  10,  15,  9,   4,   -8,  -14, -10, -7,  16,  22,  10,  -17, 1,   3,
  -14, -16, 16,  26,  11,  2,   10,  16,  8,   -20, 13,  30,  13,  18,  -2,
  0,   22,  -18, 12,  32,  14,  -4,  -11, -14, 21,  -12, 10,  35,  14,  -16,
  6,   -17, 16,  -1,  10,  36,  16,  0,   26,  -18, 11,  2,   12,  34,  16,
  18,  -1,  -19, -18, -6,  -2,  0,   10,  12,  4,   8,   -12, -12, -6,  0,
  15,  0,   -24, 38,  14,  -10, -7,  0,   18,  14,  -27, 12,  4,   2,   -4,
  -2,  22,  5,   21,  -14, -32, 8,   2,   -4,  23,  -25, 32,  -6,  -36, 12,
  6,   -4,  25,  -13, -5,  4,   -2,  10,  -2,  -4,  26,  26,  -25, 4,   30,
  11,  -12, -4,  26,  47,  -1,  16,  30,  14,  -2,  -2,  0,   18,  -28, 11,
  34,  17,  0,   -4,  0,   -28, -19, 2,   8,   10,  6,   -2,  -3,  0,   31,
  -2,  -22, 6,   15,  -3,  -8,  18,  22,  -6,  -28, 4,   15,  -6,  -10, -22,
  -28, -4,  -8,  0,   7,   -4,  -8,  -20, -26, 4,   2,   -2,  6,   -1,  -8,
  34,  19,  22,  -6,  -9,  10,  0,   -10, 4,   16,  -3,  14,  16,  -22, -6,
  10,  -10, 3,   -22, 8,   32,  -10, -9,  16,  -12, 4,   3,   -6,  28,  -8,
  -11, 20,  13,  9,   48,  -3,  11,  -6,  -12, 22,  22,  -28, 17,  0,   -4,
  -10, -12, 21,  -1,  -24, -14, -3,  -5,  -24, -10, 22,  -1,  21,  4,   -6,
  14,  -22, -12, 21,  -12, 15,  -16, -28, 8,   -8,  -12, 20,  -27, 40,  26,
  -6,  6,   4,   -2,  3,   -4,  9,   -10, -17, 2,   6,   0,   4,   22,  -39,
  -24, -1,  -8,  1,   -1,  4,   1,   -6,  19,  13,  -8,  -2,  0,   7,   -16,
  29,  18,  -5,  2,   1,   -1,  7,   12,  -12, -32, -10, 9,   4,   -2,  5,
  2,   -32, -34, 3,   1,   0,   -2,  3,   -13, 42,  44,  10,  -10, -4,  0,
  2,   -1,  -18, 24,  0,   -14, 0,   2,   12,  20,  -15, 26,  -2,  -24, -14,
  2,   18,  0,   2,   -7,  -16, -20, -14, 4,   17,  -24, 8,   -33, -30, -5,
  -17, 2,   17,  -2,  15,  17,  8,   15,  -22, 0,   20,  18,  -10, 32,  21,
  21,  -14, -3,  24,  -6,  -24, -3,  -16, 4,   -6,  -2,  26,  1,   14,  -6,
  -32, 6,   -7,  -1,  24,  -28, -40, -16, 20,  21,  -6,  -4,  -3,  12,  22,
  5,   2,   29,  4,   -6,  0,   9,   9,   17,  -26, 10,  16,  -8,  0,   -14,
  -40, 7,   -20, -3,  14,  -10, -1,  14,  5,   8,   8,   8,   5,   -10, 0,
  10,  26,  -5,  16,  10,  -6,  -6,  -2,  -40, -16, -20, 16,  -15, -14, 2,
  -3,  21,  17,  -10, 8,   -34, -17, 4,   -8,  -21, -8,  -10, 10,  -4,  -1,
  4,   0,   0,   24,  -11, 30,  1,   -16, 4,   2,   0,   26,  -24, 32,  8,
  -14, 2,   3,   -15, -13, -13, -4,  -17, -2,  4,   2,   13,  -12, 28,  -30,
  -40, 12,  8,   0,   20,  -9,  24,  -30, -20, 21,  4,   -1,  -22, -14, -13,
  -12, 15,  14,  -2,  2,   6,   17,  -4,  24,  36,  -2,  -6,  4,   -33, 18,
  -24, 6,   -3,  -12, -2,  -2,  7,   16,  -27, 18,  -2,  -9,  0,   -4,  13,
  -13, 10,  20,  -22, -8,  2,   -2,  -16, -2,  20,  -7,  -28, -3,  1,   0,
  5,   19,  -34, -8,  -7,  -4,  -1,  3,   6,   2,   -10, 28,  10,  -2,  0,
  3,   -12, -12, 37,  12,  8,   24,  -4,  0,   14,  -6,  -5,  -44, 4,   48,
  -4,  -2,  -16, 0,   -12, -46, -4,  10,  -4,  -6,  17,  -2,  18,  -22, 2,
  12,  -4,  -5,  8,   -20, 15,  17,  34,  4,   -12, 2,   -19, 14,  -5,  8,
  40,  6,   -14, 6,   3,   24,  -13, -10, -5,  8,   -4,  4,   10,  -24, 10,
  10,  -38, 1,   2,   -2,  -4,  -13, 14,  24,  -20, -6,  -1,  0,   -9,  30,
  -41, 2,   18,  0,   -9,  1,   32,  2,   -55, -10, 22,  0,   -2,  -2,  -28,
  12,  4,   14,  10,  -10, 0,   -2,  1,   -4,  24,  20,  -4,  -8,  8,   -2,
  34,  -16, -18, -25, -8,  2,   6,   -4,  -28, 6,   18,  -18, 2,   4,   0,
  -6,  -2,  -2,  20,  19,  8,   -4,  0,   0,   38,  -23, -20, 15,  3,   -4,
  4,   2,   -29, 24,  -2,  -18, -8,  -1,  6,   0,   10,  0,   2,   11,  2,
  16,  -12, 10,  -4,  -3,  -5,  5,   -6,  16,  -20, 14,  -4,  6,   -8,  6,
  -24, 19,  -26, 22,  5,   10,  -17, 6,   -21, 19,  -30, 24,  -9,  -5,  -6,
  12,  -14, 22,  -32, 18,  -2,  0,   7,   18,  -11, 32,  -30, 15,  8,   16,
  -18, 8,   -18, 32,  -24, 10,  -10, 0,   -12, 16,  -22, 18,  -25, 8,   -4,
  8,   -2,  -11, -48, -19, 8,   0,   0,   7,   -20, 10,  -42, -25, 10,  2,
  -4,  -2,  -20, 14,  0,   -6,  4,   0,   -2,  2,   18,  -8,  18,  28,  -1,
  -4,  8,   -4,  21,  -15, 28,  42,  -4,  -5,  0,   -11, -1,  6,   29,  20,
  -5,  -2,  -4,  12,  4,   18,  2,   -12, 0,   -2,  0,   2,   -22, -6,  -38,
  -27, 5,   -6,  -23, 38,  0,   -6,  46,  20,  -2,  -6,  12,  -21, -8,  5,
  28,  0,   -2,  -2,  8,   -12, 14,  12,  -31, -9,  10,  0,   -13, 20,  -4,
  -14, -26, -5,  8,   -3,  2,   -10, -10, -9,  22,  4,   -4,  -5,  8,   -16,
  22,  -2,  24,  13,  0,   -3,  -8,  26,  10,  -16, -14, -6,  14,  0,   -2,
  -2,  -28, 24,  -2,  -42, 8,   0,   -9,  -8,  4,   -15, -4,  45,  9,   -4,
  9,   6,   -8,  2,   6,   48,  12,  -12, -10, 6,   -7,  30,  4,   35,  14,
  -18, -2,  1,   -6,  6,   -17, 20,  15,  -10, 9,   0,   2,   -14, -19, 0,
  10,  0,   -9,  0,   2,   7,   12,  -21, -10, 12,  2,   4,   -2,  6,   22,
  -30, -28, 16,  6,   -11, 14,  -29, -11, -24, -26, 16,  7,   17,  -4,  -48,
  -20, 0,   -16, -21, -2,  -20, 14,  6,   15,  -16, -24, -16, 8,   -2,  4,
  12,  38,  -8,  -27, -2,  -7,  8,   -4,  -28, -15, 0,   -10, 2,   2,   -9,
  6,   16,  -34, -6,  12,  2,   3,   6,   -16, 26,  16,  10,  14,  0,   -17,
  16,  -18, -16, 16,  18,  10,  7,   13,  -15, 20,  4,   -22, -4,  16,  14,
  26,  19,  -16, 30,  -19, -3,  2,   -22, -32, -6,  3,   24,  -12, 10,  1,
  -27, 26,  -6,  4,   -22, 2,   26,  -6,  -16, -3,  -2,  8,   -8,  0,   18,
  -2,  -2,  -22, 8,   -12, 27,  -1,  6,   10,  8,   24,  5,   -10, -8,  0,
  11,  8,   7,   -10, -22, 32,  -24, -8,  -4,  -10, 13,  3,   14,  -14, 7,
  22,  -32, -20, 22,  -10, -35, -4,  15,  -2,  -15, -3,  -18, 20,  36,  20,
  -3,  12,  4,   -4,  -26, -20, -19, -14, -10, 6,   -2,  -8,  -14, 10,  2,
  -6,  8,   -22, -26, -3,  10,  7,   29,  4,   7,   -12, -10, 8,   15,  -24,
  -34, -12, -12, 22,  28,  6,   3,   32,  10,  26,  0,   13,  16,  2,   0,
  -16, 2,   -18, 6,   -16, -20, 2,   4,   -23, 8,   -30, -8,  -10, -8,  24,
  19,  20,  10,  10,  16,  3,   -14, 30,  28,  -9,  -22, 13,  -10, 12,  10,
  20,  20,  4,   4,   -8,  -26, 0,   23,  11,  6,   5,   14,  5,   36,  -8,
  0,   2,   -5,  -16, -13, -12, 13,  -10, -4,  -10, -10, 12,  12,  -8,  -38,
  -8,  6,   -18, -16, -2,  -10, 18,  13,  16,  -11, -30, -25, -31, 8,   -6,
  18,  -8,  6,   -8,  -24, 27,  8,   -18, 16,  -18, -2,  -12, -28, -18, -6,
  14,  0,   -13, 4,   -6,  -28, 6,   -2,  -2,  -22, 26,  10,  -10, -23, 14,
  -2,  14,  5,   22,  -4,  -8,  -12, -20, -5,  1,   2,   -19, -14, 1,   16,
  16,  10,  -26, -10, -23, 3,   12,  33,  -9,  -4,  12,  16,  14,  23,  13,
  39,  8,   12,  -24, 7,   -10, 21,  25,  -12, -13, 0,   10,  14,  -16, 29,
  30,  -15, 12,  -6,  -8,  4,   8,   7,   13,  -6,  -7,  8,   7,   -22, 18,
  -30, -7,  16,  2,   -11, 18,  -15, 7,   -45, -15, 27,  12,  -10, -2,  -12,
  12,  -17, -13, 9,   -15, 14,  -4,  4,   -2,  16,  -6,  -12, 4,   1,   -13,
  27,  -29, 29,  8,   -22, -9,  14,  19,  18,  2,   -18, 34,  -24, 14,  -16,
  -22, -19, 5,   -9,  30,  -31, -12, 6,   28,  -7,  10,  -14, 6,   -3,  8,
  2,   0,   -2,  18,  -18, 2,   26,  -2,  -14, -22, -10, -6,  0,   16,  11,
  -4,  20,  27,  18,  -9,  28,  10,  -8,  3,   -10, -27, 12,  8,   18,  -17,
  -6,  -2,  6,   9,   -8,  -16, -15, -35, 10,  10,  -2,  -5,  -20, 24,  -30,
  -4,  16,  -10, -2,  26,  -6,  12,  -20, 16,  2,   12,  -3,  -16, -10, 4,
  -12, 36,  -34, -14, 8,   3,   10,  0,   -6,  28,  -42, 6,   -6,  2,   6,
  2,   5,   -1,  -13, 4,   0,   -4,  -4,  -6,  11,  -20, 17,  -8,  4,   -1,
  8,   -6,  17,  -31, 32,  3,   2,   -8,  14,  -26, 20,  -26, 28,  -18, 32,
  -34, 24,  -6,  -26, -10, 34,  12,  -12, 6,   -1,  -16, 10,  -14, 22,  2,
  -9,  16,  -16, 1,   31,  -21, -12, -15, 16,  -16, 22,  11,  2,   -8,  -16,
  10,  -8,  -12, 2,   -21, -16, 12,  -5,  -2,  -2,  33,  -22, 6,   -2,  7,
  -4,  6,   -8,  -11, 4,   43,  -3,  -3,  0,   -5,  6,   0,   1,   -28, -6,
  18,  -1,  -6,  9,   -34, 4,   42,  -10, -14, -30, 2,   -2,  34,  2,   -22,
  2,   -4,  -26, 6,   -6,  -16, -6,  -27, -14, 3,   13,  -13, 12,  -20, 12,
  18,  8,   4,   30,  9,   -6,  24,  10,  5,   30,  6,   18,  1,   0,   -17,
  -8,  -20, 0,   8,   -4,  -12, 17,  -6,  15,  21,  -20, -1,  -6,  12,  -20,
  20,  -24, 4,   2,   -9,  -4,  0,   -2,  -12, 15,  14,  35,  13,  40,  -6,
  8,   4,   6,   -18, 18,  4,   28,  4,   -4,  -2,  -3,  0,   -22, -24, -6,
  4,   -4,  7,   -16, 16,  -35, -27, -20, -2,  1,   14,  -6,  4,   -2,  16,
  -21, 4,   -4,  -24, 14,  -4,  26,  36,  -22, -9,  14,  5,   14,  -6,  12,
  4,   0,   7,   -11, 6,   -14, -1,  -16, -26, 30,  6,   -7,  -5,  7,   10,
  -4,  52,  -8,  -6,  8,   9,   -20, 4,   -10, 40,  -6,  5,   -10, -2,  2,
  0,   -2,  -5,  2,   -1,  8,   -4,  16,  -4,  12,  -38, -8,  -9,  6,   -8,
  2,   -21, 8,   -49, -24, 12,  -8,  2,   8,   -3,  -2,  -28, -9,  -8,  7,
  0,   -10, 21,  -2,  24,  20,  6,   -9,  9,   -12, 8,   -10, 38,  22,  -13,
  22,  -4,  -22, -8,  1,   2,   -8,  18,  -26, 4,   29,  3,   16,  8,   2,
  -15, 20,  -2,  -12, 6,   3,   13,  24,  4,   -6,  -8,  -4,  -14, -20, 2,
  15,  8,   -10, 15,  22,  3,   -3,  -18, -24, -15, 28,  -23, -30, 0,   10,
  -23, -37, 12,  -28, 21,  26,  -1,  1,   -6,  -5,  -6,  16,  -12, -8,  -2,
  2,   15,  37,  -8,  10,  1,   -23, 7,   -3,  30,  23,  14,  -20, 4,   16,
  7,   0,   16,  -6,  -14, 15,  -1,  -4,  -2,  -8,  -22, -42, 8,   0,   -8,
  -2,  -16, -4,  -32, -18, 1,   -10, 9,   16,  3,   18,  -5,  38,  -7,  20,
  -14, -14, -2,  12,  10,  46,  6,   -16, 8,   12,  -4,  -11, 14,  8,   -2,
  6,   1,   -10, 12,  0,   -2,  -44, 10,  -4,  -2,  -6,  3,   25,  0,   -13,
  -19, 3,   8,   16,  -4,  8,   8,   2,   32,  5,   -22, -11, -2,  -25, -1,
  12,  -42, -10, 34,  -8,  4,   -4,  -10, -6,  48,  3,   -32, 8,   2,   10,
  -10, -2,  -44, 9,   24,  7,   -8,  6,   6,   7,   33,  -16, -12, -14, 15,
  -4,  2,   2,   -14, 8,   6,   4,   -6,  -6,  2,   -8,  8,   -5,  5,   -14,
  4,   -46, -28, 34,  -8,  2,   1,   -2,  -4,  14,  12,  -11, 9,   5,   -10,
  24,  -8,  38,  22,  -32, -14, -2,  6,   -10, -4,  -2,  -13, 19,  16,  -4,
  1,   -10, 11,  -18, -26, 26,  -13, 4,   0,   18,  -6,  12,  4,   -24, 4,
  4,   -12, -4,  -14, 8,   20,  -24, 0,   -4,  12,  -10, 24,  -22, 0,   20,
  -2,  15,  5,   15,  16,  7,   -24, -22, 0,   -22, -7,  -12, -22, -14, 0,
  10,  3,   22,  10,  2,   9,   18,  28,  16,  -6,  -22, -9,  4,   19,  1,
  3,   -15, 8,   14,  16,  -8,  -28, -27, -24, -18, -10, -4,  -23, 7,   4,
  13,  0,   28,  4,   2,   11,  14,  3,   31,  28,  22,  -2,  -1,  -2,  -13,
  2,   -28, -18, -34, -7,  -16, 14,  -20, 32,  27,  -22, 12,  12,  18,  -8,
  22,  -22, -16, -2,  -2,  -21, -12, -11, -4,  -14, -10, 14,  -15, 25,  10,
  22,  -14, 34,  20,  2,   2,   -22, -11, -18, 16,  -16, -14, -6,  16,  14,
  17,  0,   2,   -20, -2,  -10, -1,  -6,  -17, 14,  -11, 36,  23,  -8,  -14,
  2,   6,   -8,  4,   -16, -23, 22,  2,   6,   8,   14,  8,   33,  6,   32,
  22,  -9,  -20, -9,  -20, -16, -27, -6,  -14, 16,  28,  10,  18,  -2,  -2,
  -25, -14, -18, -29, -14, -7,  4,   32,  6,   10,  19,  24,  16,  4,   -7,
  -7,  25,  16,  -19, -12, -21, 0,   2,   -20, -12, -14, 12,  3,   18,  -5,
  1,   8,   -24, -19, -6,  4,   -14, 12,  -9,  8,   16,  19,  -10, 6,   -24,
  1,   20,  6,   15,  -6,  19,  -11, 40,  -6,  -20, -25, -4,  -2,  -22, 8,
  -46, -2,  12,  16,  -17, 6,   14,  4,   34,  19,  -10, 24,  0,   2,   -5,
  -16, -16, -24, -6,  -19, 4,   -2,  -2,  15,  11,  8,   36,  -14, 12,  -6,
  4,   -12, -4,  -2,  -32, 6,   14,  -4,  -3,  6,   -2,  2,   10,  6,   -23,
  12,  -6,  10,  -17, 35,  -8,  24,  -10, 23,  4,   -4,  11,  -20, -17, 3,
  -16, -9,  0,   -7,  2,   -4,  34,  -22, 8,   -21, 0,   7,   6,   -3,  -1,
  -22, 36,  8,   2,   -10, -4,  -4,  -19, 21,  -6,  12,  -5,  12,  -5,  21,
  8,   24,  -46, 3,   1,   -2,  -4,  -1,  -26, -12, -14, 0,   2,   -2,  7,
  -11, 24,  -10, 38,  -10, 2,   -11, 10,  18,  22,  -24, -7,  -16, 0,   17,
  -4,  -38, -23, 18,  11,  12,  2,   -24, 1,   48,  10,  2,   -4,  18,  -6,
  34,  -8,  -30, -8,  0,   -16, -11, 8,   -36, 10,  16,  -4,  3,   14,  -14,
  -9,  34,  -16, -2,  10,  -2,  10,  8,   8,   -24, 16,  -13, -4,  -6,  -11,
  7,   -4,  12,  -10, 12,  -2,  6,   2,   -8,  4,   -10, 0,   0,   -10, 10,
  34,  30,  -9,  18,  -1,  -2,  6,   -11, -36, -28, 12,  -21, 0,   8,   -2,
  2,   -16, -2,  -12, 22,  -2,  -10, -8,  15,  35,  26,  10,  -18, 3,   14,
  20,  -20, -9,  -21, -4,  11,  0,   -24, -15, -6,  -8,  -8,  0,   -4,  -4,
  26,  6,   27,  30,  30,  0,   0,   2,   -12, 0,   -16, -22, -18, -3,  4,
  4,   -10, 17,  -24, -6,  36,  6,   -11, 2,   8,   -19, 30,  1,   -37, -11,
  19,  -9,  4,   2,   0,   -5,  6,   12,  -20, 11,  -5,  5,   -18, 2,   32,
  -10, 16,  -8,  -5,  -2,  15,  0,   -38, 6,   -8,  0,   21,  0,   -2,  4,
  -11, -2,  -1,  7,   -34, 12,  -18, 1,   48,  0,   2,   -6,  20,  -12, 14,
  -4,  -28, -4,  6,   -2,  21,  -13, 24,  -24, 20,  4,   -4,  -2,  -18, 0,
  -2,  5,   -10, -1,  -2,  14,  -3,  24,  -34, 28,  -18, 0,   4,   -15, 6,
  -15, 14,  -8,  8,   0,   -2,  6,   8,   -10, 30,  -34, 16,  0,   3,   -2,
  -6,  12,  -34, 20,  -14, 4,   -9,  10,  -14, 17,  -2,  40,  -14, -3,  6,
  -8,  15,  -20, 18,  -40, 17,  6,   -10, 15,  -14, 14,  23,  -14, 7,   -9,
  16,  -20, 18,  -6,  -41, 16,  -6,  12,  -18, 18,  -16, -3,  22,  9,   -14,
  -10, 13,  -8,  4,   16,  -2,  -18, 28,  8,   -6,  0,   10,  -36, -10, 6,
  -10, -4,  -2,  6,   -18, 38,  26,  6,   -18, 3,   3,   -5,  12,  -23, -44,
  -2,  17,  -1,  -1,  0,   -4,  5,   28,  -6,  -6,  -1,  2,   2,   9,   18,
  10,  -16, -3,  2,   -4,  -1,  -12, -33, -16, 12,  0,   -5,  8,   -4,  16,
  46,  8,   4,   4,   9,   -14, 14,  -24, -45, 1,   -7,  -6,  -12, 20,  -24,
  32,  34,  -11, -4,  6,   10,  -20, 23,  -33, -23, 16,  8,   -6,  -7,  15,
  -16, 24,  10,  -14, -8,  6,   3,   -7,  6,   -10, -2,  7,   4,   -2,  -1,
  -1,  2,   -3,  8,   -7,  46,  8,   2,   1,   -2,  -2,  -8,  -2,  -57, -14,
  -2,  0,   -1,  9,   -2,  17,  26,  20,  2,   -2,  3,   -12, 10,  -16, 14,
  -18, -3,  4,   -4,  8,   -12, -2,  -38, -2,  2,   -2,  0,   3,   1,   31,
  24,  30,  -2,  -1,  2,   -10, 9,   -38, 1,   -40, 0,   0,   0,   6,   -6,
  17,  -6,  18,  2,   -9,  16,  -22, 34,  -22, 5,   -10, -5,  12,  -24, 30,
  -44, 24,  8,   6,   5,   -9,  18,  -18, 26,  2,   -34, 8,   -2,  4,   -7,
  7,   -8,  -17, 32,  -16, 0,   3,   -4,  0,   -8,  19,  4,   8,   2,   -6,
  8,   -2,  14,  -16, -36, 10,  -2,  4,   -6,  0,   -8,  7,   40,  -21, 0,
  -2,  3,   1,   2,   0,   -20, 14,  0,   -2,  0,   -4,  3,   6,   -16, 38,
  -2,  6,   -4,  12,  -8,  -7,  14,  -56, 4,   -10, 10,  -21, 18,  0,   14,
  40,  -6,  10,  -11, 21,  -18, 6,   -25, -5,  4,   -8,  6,   -14, 10,  2,
  6,   -28, -2,  2,   0,   1,   3,   -16, 18,  42,  0,   2,   -4,  7,   -11,
  24,  -29, -27, 0,   -2,  2,   -5,  8,   -14, 18,  6,   -1,  -2,  4,   -7,
  10,  13,  14,  -15, -1,  7,   -9,  14,  -20, -24, -14, 12,  3,   -10, 12,
  -20, 24,  28,  6,   -2,  -4,  12,  -14, 29,  -29, -15, 3,   -7,  6,   -13,
  17,  -36, 32,  2,   -16, 26,  -6,  12,  -16, 33,  -26, 2,   20,  -32, 4,
  -8,  10,  -23, 15,  -2,  -18, 26,  -2,  3,   -4,  9,   -6,  1,   8,   -11,
  -1,  0,   3,   -1,  -3,  -10, -8,  15,  1,   1,   -6,  3,   3,   25,  13,
  -28, -1,  -2,  6,   -5,  -3,  -36, -12, 40,  1,   1,   -6,  5,   5,   41,
  16,  -48, 0,   0,   4,   -4,  -8,  -39, -14, 43,  0,   0,   -2,  0,   10,
  29,  7,   -34, 0,   1,   -1,  2,   -8,  -16, -2,  22,  0,   -1,  1,   -2,
  3,   6,   0,   -6,  0,   0,   -1,  2,   -4,  6,   8,   14,  0,   0,   2,
  -4,  4,   -16, -22, -24, 0,   0,   -6,  7,   -6,  25,  35,  33,  1,   -1,
  7,   -8,  8,   -29, -41, -36, 0,   0,   -6,  5,   -4,  23,  48,  32,  0,
  0,   3,   -2,  0,   -15, -42, -26, 0,   0,   -2,  1,   2,   6,   26,  14,
  0,   0,   0,   0,   -2,  -2,  -10, -4,  -2,  2,   -6,  8,   -14, 21,  -27,
  12,  2,   -2,  8,   -12, 18,  -32, 44,  -18, -2,  0,   -5,  8,   -12, 28,
  -42, 15,  0,   2,   0,   -2,  0,   -14, 24,  -9,  0,   -6,  7,   -9,  17,
  -10, 6,   -8,  -2,  8,   -12, 16,  -27, 26,  -24, 20,  2,   -6,  10,  -14,
  24,  -28, 28,  -21, -1,  4,   -6,  6,   -11, 14,  -14, 10,  0,   0,   -2,
  -2,  2,   -6,  6,   -5,  0,   0,   0,   6,   -8,  18,  -20, 12,  1,   -2,
  4,   -12, 14,  -30, 30,  -16, -1,  2,   -5,  14,  -18, 36,  -36, 20,  1,
  -2,  6,   -16, 18,  -40, 41,  -20, 0,   2,   -5,  14,  -14, 34,  -38, 16,
  0,   -2,  4,   -10, 10,  -22, 26,  -11, 0,   1,   -2,  4,   -4,  9,   -10,
  4
};

static const int32_t mdt8x8_mode2[4096] = {
  15,  39,  43,  30,  27,  38,  46,  36,  16,  35,  34,  22,  20,  26,  30,
  24,  8,   14,  9,   1,   0,   4,   8,   4,   0,   0,   0,   0,   1,   2,
  0,   -2,  0,   -1,  -2,  -1,  0,   0,   0,   0,   1,   2,   2,   3,   2,
  0,   0,   1,   1,   0,   0,   0,   0,   2,   2,   1,   0,   0,   0,   0,
  0,   0,   0,   0,   -14, -22, -18, -14, -20, -26, -24, -14, 6,   16,  18,
  8,   3,   17,  30,  26,  22,  46,  40,  16,  8,   31,  44,  28,  16,  28,
  21,  6,   5,   16,  22,  12,  4,   3,   -2,  -4,  -1,  4,   5,   6,   3,
  4,   4,   6,   3,   -1,  -2,  0,   0,   0,   1,   2,   2,   2,   0,   1,
  0,   0,   -1,  -2,  0,   0,   0,   0,   -10, -18, -10, -6,  -10, -14, -16,
  -11, 6,   2,   10,  19,  23,  22,  16,  23,  6,   4,   6,   8,   -4,  -18,
  -25, -18, -22, -31, -21, 0,   0,   -20, -36, -27, -5,  -14, -25, -20, -12,
  -2,  3,   9,   20,  38,  34,  30,  20,  10,  8,   15,  7,   10,  8,   8,
  10,  14,  16,  11,  2,   3,   2,   2,   0,   0,   2,   4,   40,  27,  -34,
  -47, 0,   34,  16,  -27, 38,  18,  -34, -40, 3,   34,  10,  -28, 24,  14,
  -11, -12, 8,   22,  4,   -16, 5,   1,   -4,  -4,  1,   1,   -4,  -5,  -4,
  -5,  -4,  -2,  -4,  -4,  0,   4,   2,   5,   6,   6,   3,   0,   1,   2,
  1,   0,   0,   0,   1,   2,   2,   1,   0,   0,   0,   0,   0,   0,   1,
  1,   -16, -20, 6,   5,   -8,  -15, -18, -9,  14,  27,  22,  13,  18,  12,
  0,   -14, 14,  6,   -14, -3,  28,  27,  8,   -10, 1,   -20, -41, -40, -20,
  -16, -16, -18, -8,  -8,  0,   6,   0,   -16, -20, -22, -24, -36, -28, -20,
  -6,  0,   2,   -3,  5,   0,   -10, -16, -18, -8,  0,   -4,  -1,  6,   14,
  12,  4,   -4,  -3,  -2,  6,   38,  26,  -26, -71, -34, 24,  35,  -10, -2,
  -3,  -27, -48, -12, 22,  19,  -3,  -2,  6,   9,   3,   6,   2,   -2,  0,
  -7,  -8,  -2,  -2,  -10, -12, -4,  -8,  -14, -14, -6,  -6,  -14, -12, -4,
  -2,  -4,  -3,  -2,  1,   2,   1,   0,   3,   3,   0,   -3,  -3,  0,   2,
  2,   0,   2,   2,   2,   0,   -2,  -1,  0,   -12, 8,   42,  34,  -17, -34,
  -19, 4,   6,   -2,  -10, -6,  6,   14,  -4,  -19, 28,  6,   -36, -34, 4,
  24,  -8,  -41, 28,  18,  -8,  -6,  20,  32,  8,   -12, 10,  6,   -2,  -6,
  2,   14,  12,  12,  10,  18,  17,  9,   -4,  -8,  -6,  -2,  -8,  -5,  4,
  9,   9,   1,   -6,  0,   0,   -6,  -11, -10, -2,  4,   2,   0,   -44, -56,
  -42, -9,  12,  13,  54,  54,  -4,  -2,  -7,  -13, -18, -6,  14,  9,   16,
  12,  -10, -22, -12, 6,   0,   -15, 9,   3,   -13, -11, 6,   14,  -2,  -16,
  7,   4,   -2,  -1,  4,   8,   1,   -6,  0,   0,   1,   2,   0,   -2,  1,
  2,   0,   -1,  0,   -2,  -2,  -1,  0,   1,   1,   2,   2,   2,   2,   0,
  1,   1,   -4,  -6,  -18, -36, -28, -4,  7,   -1,  17,  38,  41,  24,  8,
  6,   4,   -4,  -14, -19, -14, -8,  -9,  -18, -14, -3,  -2,  -14, 0,   10,
  8,   4,   0,   12,  -4,  -6,  8,   10,  8,   8,   0,   3,   8,   8,   1,
  -16, -32, -28, -28, -30, -22, -14, 4,   12,  12,  -9,  -24, -9,  -2,  -18,
  -28, -24, -6,  10,  4,   -1,  14,  11,  -6,  -28, -29, -8,  4,   12,  5,
  20,  32,  21,  4,   -9,  -22, -17, -2,  -5,  -6,  -6,  -7,  -6,  -4,  0,
  -6,  -2,  -8,  -8,  2,   14,  16,  1,   28,  40,  28,  18,  20,  31,  32,
  10,  -2,  -1,  2,   13,  22,  20,  22,  24,  16,  10,  -4,  -10, -9,  4,
  16,  8,   4,   17,  26,  22,  10,  -2,  3,   6,   0,   8,   2,   -8,  -2,
  5,   -14, 4,   -18, -30, -22, -9,  14,  28,  30,  33,  10,  16,  20,  19,
  2,   -18, -27, -28, -8,  -14, -18, -19, -12, -2,  8,   11,  11,  22,  20,
  16,  14,  18,  24,  22,  -8,  -8,  -7,  -5,  -3,  -4,  -8,  -8,  -13, -32,
  -27, -15, -10, -8,  -19, -29, -3,  -6,  0,   2,   3,   0,   -8,  -14, -7,
  -5,  2,   18,  0,   -10, -11, -36, 14,  15,  -5,  -18, -24, 19,  48,  32,
  -3,  -6,  -15, -38, -41, -21, -7,  -7,  -23, -10, 6,   12,  6,   10,  12,
  8,   6,   18,  24,  22,  4,   -10, -16, -23, -9,  -16, -14, -11, -4,  7,
  13,  14,  10,  19,  16,  10,  5,   4,   11,  8,   1,   4,   3,   0,   -6,
  -6,  -2,  1,   11,  8,   -7,  -17, 2,   13,  -6,  10,  -21, -15, 2,   9,
  14,  -3,  -6,  15,  0,   12,  16,  26,  27,  -2,  -28, -36, 14,  4,   -18,
  -23, 3,   27,  26,  17,  10,  6,   2,   0,   0,   -12, -21, -22, 4,   -4,
  -10, -17, -18, -8,  -2,  -1,  8,   34,  37,  28,  20,  8,   16,  33,  6,
  4,   -4,  -6,  -2,  5,   12,  16,  38,  9,   -42, 10,  14,  -58, -12, 61,
  23,  -8,  -28, 20,  36,  11,  6,   14,  -2,  -16, -16, -10, -1,  10,  6,
  -1,  -8,  0,   18,  11,  -6,  -12, 2,   14,  -10, -2,  9,   8,   -4,  -12,
  -4,  5,   -4,  -6,  -6,  -4,  -2,  0,   -1,  -4,  4,   4,   1,   0,   1,
  2,   4,   4,   2,   2,   3,   3,   2,   0,   2,   3,   42,  23,  -25, -6,
  20,  -4,  -17, -12, -15, -10, 9,   16,  -12, -18, 13,  35,  -10, -12, -10,
  -14, -21, -2,  18,  15,  29,  11,  -26, -23, 10,  22,  -16, -50, 18,  4,
  -23, -20, 10,  24,  -1,  -24, -1,  -2,  -2,  -3,  -5,  -6,  -3,  -3,  -7,
  -6,  -3,  -4,  -8,  -8,  -6,  -4,  -2,  -3,  -2,  -2,  -2,  -2,  -2,  -2,
  -26, -6,  11,  -24, -22, 22,  9,   -8,  -22, -24, -4,  3,   32,  40,  18,
  21,  -24, -48, -34, -3,  30,  18,  6,   16,  22,  30,  22,  12,  0,   -14,
  -16, -20, 6,   8,   6,   4,   2,   5,   8,   7,   -6,  -10, -6,  -7,  -2,
  5,   8,   6,   3,   8,   7,   4,   3,   3,   6,   8,   4,   4,   3,   2,
  0,   0,   2,   4,   -2,  1,   6,   9,   26,  1,   -24, 9,   3,   16,  0,
  -40, -24, -12, 1,   18,  0,   0,   -2,  2,   18,  14,  16,  14,  -1,  -18,
  -10, -7,  -11, -27, -26, -5,  2,   -4,  16,  28,  30,  27,  23,  30,  12,
  10,  4,   -8,  -17, -13, -12, -19, -2,  13,  16,  11,  12,  5,   4,   22,
  14,  12,  4,   6,   14,  22,  24,  24,  18,  -12, -12, 32,  -2,  -31, 64,
  -52, 16,  -10, -9,  29,  -16, -22, 34,  -6,  -10, -14, -4,  21,  24,  11,
  -4,  -8,  10,  5,   -6,  -24, -19, -6,  3,   12,  2,   7,   11,  2,   -2,
  2,   12,  18,  8,   7,   8,   5,   0,   1,   0,   -7,  0,   3,   2,   2,
  -1,  -6,  -2,  6,   1,   0,   -2,  0,   0,   4,   6,   7,   0,   -12, -4,
  3,   12,  11,  -24, 13,  44,  36,  2,   -18, -22, -27, -5,  36,  -17, -24,
  -4,  28,  42,  10,  -21, -23, 10,  12,  6,   9,   9,   6,   0,   -8,  4,
  12,  4,   -6,  -10, -5,  6,   7,   -4,  -2,  2,   2,   8,   20,  22,  22,
  -2,  -3,  -1,  1,   -4,  -9,  -11, -14, -10, -12, -12, -14, -16, -16, -17,
  -18, 14,  -3,  -6,  -8,  10,  3,   -14, 4,   -25, 6,   38,  -4,  -14, 3,
  6,   -8,  -20, 9,   9,   -26, -30, -2,  -4,  -44, 26,  40,  19,  -22, -47,
  -28, 0,   -4,  -22, -14, 4,   6,   -12, -16, 12,  34,  -3,  -6,  2,   6,
  4,   2,   2,   1,   8,   12,  6,   0,   -5,  -6,  2,   2,   -5,  -2,  -2,
  -6,  -10, -9,  -4,  -2,  -12, -2,  4,   3,   -18, 20,  -10, -8,  38,  14,
  -20, 14,  0,   -18, -6,  32,  7,   -2,  -14, 2,   -14, -27, -18, -10, 10,
  23,  20,  -4,  -10, 6,   16,  1,   -6,  -12, -22, -29, -16, 2,   11,  11,
  -11, -11, -11, -4,  2,   -16, -26, -26, 3,   -7,  -13, -12, -8,  6,   12,
  9,   13,  22,  29,  30,  26,  16,  18,  19,  9,   -10, 10,  -4,  -28, 40,
  -12, 4,   6,   -16, -16, 24,  1,   -21, -18, 38,  27,  2,   -32, -20, -6,
  7,   22,  26,  -1,  -12, -20, -30, -21, 0,   16,  22,  -26, -8,  24,  19,
  -8,  -13, -1,  4,   10,  14,  22,  16,  5,   2,   4,   0,   6,   10,  4,
  -2,  -4,  -9,  -4,  2,   -10, -11, -14, -16, -13, -9,  -6,  -3,  70,  -60,
  7,   34,  -44, 31,  -6,  10,  8,   -20, 10,  2,   -12, 12,  -2,  -7,  -3,
  14,  14,  -4,  6,   1,   -8,  -8,  -2,  4,   10,  20,  18,  -3,  -20, -16,
  6,   -2,  0,   10,  12,  4,   -5,  -1,  -4,  -10, -7,  -5,  -6,  -4,  0,
  -2,  -2,  -4,  0,   0,   3,   4,   0,   0,   2,   0,   2,   3,   6,   6,
  4,   3,   1,   15,  -17, -10, 19,  5,   -3,  -15, -30, -12, 28,  24,  -20,
  -18, 12,  12,  28,  1,   -22, -6,  20,  18,  -8,  -22, 4,   -13, 1,   38,
  50,  13,  -8,  14,  -26, -23, 6,   24,  0,   -22, -4,  26,  -14, -8,  5,
  7,   -1,  -6,  -1,  2,   8,   -4,  -14, -16, -8,  8,   7,   -6,  4,   8,
  13,  15,  9,   4,   3,   1,   -7,  14,  0,   -2,  -6,  -16, 22,  -14, 5,
  4,   -17, 8,   20,  -21, -22, 12,  42,  34,  7,   2,   4,   -26, -22, 6,
  9,   12,  22,  22,  -2,  -13, -28, -38, -7,  -4,  10,  19,  17,  17,  12,
  1,   -8,  -14, -11, -11, -14, -11, 0,   -4,  14,  30,  14,  -2,  -12, -14,
  2,   6,   -8,  -6,  -7,  -11, -24, -24, -16, -10, 3,   -8,  -10, 18,  -4,
  2,   -7,  4,   -8,  7,   4,   -14, -8,  32,  6,   -6,  -8,  -16, -7,  10,
  2,   -4,  -10, 6,   12,  -12, -9,  0,   16,  9,   14,  38,  -6,  -24, -30,
  -10, 20,  25,  16,  2,   15,  8,   -5,  -4,  8,   0,   -7,  -24, 16,  30,
  2,   -30, -42, -28, 10,  23,  -15, 5,   6,   -4,  -20, -32, -16, -3,  2,
  -1,  6,   -8,  6,   6,   -2,  1,   0,   -16, 10,  2,   -10, -6,  4,   -1,
  -10, -2,  0,   -10, 18,  30,  16,  -14, -60, -19, 20,  0,   -11, 16,  13,
  -30, 6,   24,  6,   -21, -28, 2,   20,  5,   -3,  1,   -2,  4,   -10, -33,
  -34, -26, 14,  12,  -2,  -4,  0,   10,  18,  10,  -6,  0,   5,   0,   -16,
  -24, -20, -18, -24, 14,  -2,  -2,  0,   23,  -28, 18,  34,  -27, -10, 48,
  -39, 7,   28,  -40, 25,  -16, 2,   36,  -26, -1,  20,  -11, 10,  0,   -5,
  7,   -2,  -12, -15, -2,  8,   10,  -4,  -2,  14,  6,   0,   12,  -4,  -8,
  -9,  -7,  -4,  4,   3,   -4,  10,  12,  12,  15,  8,   3,   2,   -2,  -2,
  -8,  -3,  -2,  -7,  -6,  -4,  -6,  -16, 13,  -14, 20,  -21, 10,  6,   -5,
  0,   17,  -32, 10,  14,  2,   -12, 3,   -50, 0,   23,  6,   -16, 11,  22,
  -12, -15, -4,  -16, -12, 16,  34,  10,  -22, -17, -36, -9,  27,  26,  3,
  2,   38,  -20, -19, -2,  6,   4,   -9,  0,   15,  4,   4,   7,   6,   11,
  14,  4,   -4,  0,   -2,  -5,  -5,  0,   -2,  -6,  -8,  -13, 18,  -12, 6,
  -14, 18,  -2,  -10, -14, 8,   -13, 24,  4,   -18, -8,  16,  -5,  8,   6,
  -22, 0,   42,  7,   -44, -15, -15, 32,  19,  -22, -17, -4,  8,   29,  -2,
  -18, 2,   30,  12,  -20, -20, 29,  17,  -13, -13, 14,  26,  6,   -12, -14,
  -3,  -2,  -9,  -12, -14, -10, -1,  2,   2,   -3,  -2,  2,   4,   6,   8,
  -12, 20,  -32, 34,  -16, 10,  -4,  2,   -20, 20,  -12, 8,   -21, 33,  -26,
  2,   -6,  -2,  12,  15,  -10, 12,  -10, 8,   10,  -4,  -7,  12,  -2,  4,
  -12, -20, 6,   30,  27,  0,   -38, -25, 0,   -4,  -4,  12,  20,  6,   -17,
  -18, -3,  0,   8,   16,  4,   -9,  -20, -32, -19, -12, 2,   6,   7,   4,
  2,   8,   18,  23,  -4,  0,   0,   1,   0,   -2,  10,  -7,  18,  -7,  6,
  -10, 9,   -4,  -23, 18,  -10, -2,  14,  -13, -16, 14,  -6,  7,   32,  2,
  -28, 10,  10,  -30, -8,  22,  56,  24,  -12, 11,  9,   -32, -28, 24,  -8,
  -3,  8,   16,  4,   -13, -26, -22, 9,   0,   -3,  -4,  5,   22,  20,  -2,
  0,   -1,  2,   0,   -8,  -17, -18, -20, 2,   -19, 40,  -36, 22,  -14, 8,
  -2,  36,  -28, 4,   -8,  14,  -1,  -4,  6,   -7,  -22, 25,  14,  -23, 8,
  16,  -23, 0,   4,   2,   7,   2,   22,  -2,  -15, -8,  -6,  10,  26,  12,
  -10, -22, -8,  6,   16,  15,  10,  0,   -13, -6,  2,   0,   14,  3,   -20,
  -31, -34, -15, -8,  8,   14,  10,  1,   1,   2,   12,  22,  6,   -9,  10,
  -8,  -3,  8,   -16, 12,  -26, 34,  -30, 3,   20,  -32, 46,  -26, -26, 26,
  -26, 12,  17,  -39, 30,  -12, 6,   6,   2,   2,   17,  -8,  -4,  -8,  19,
  12,  14,  8,   0,   -16, -21, 0,   6,   12,  16,  14,  6,   -5,  -13, -14,
  6,   9,   -4,  -12, -12, -8,  2,   -2,  -1,  4,   2,   3,   -2,  -5,  0,
  0,   10,  -14, 16,  -16, 5,   -2,  6,   -2,  -4,  -3,  -6,  3,   15,  -13,
  3,   4,   -7,  18,  -9,  -16, -10, 8,   8,   6,   -6,  -20, -20, 14,  13,
  -5,  4,   12,  17,  4,   -24, -34, -20, -10, 24,  44,  -5,  -5,  -26, -28,
  -8,  13,  12,  11,  20,  30,  26,  19,  -4,  -24, -34, -36, 8,   4,   0,
  1,   1,   6,   8,   10,  16,  -16, 2,   6,   -3,  -4,  12,  -6,  -22, 16,
  4,   -17, 10,  4,   -11, 9,   24,  -20, -20, 41,  -20, -6,  34,  -24, 26,
  -32, -14, 50,  -36, -6,  46,  -24, 3,   -4,  -3,  -1,  -2,  4,   4,   0,
  -7,  -3,  -5,  -2,  6,   -3,  -5,  6,   -2,  -6,  -2,  4,   8,   10,  6,
  8,   -2,  -8,  -2,  3,   -1,  2,   2,   -7,  0,   0,   0,   4,   -7,  4,
  4,   -3,  0,   2,   -2,  -4,  16,  -14, -2,  2,   8,   -6,  8,   7,   -24,
  2,   24,  -16, -10, 10,  -12, -5,  27,  -12, -20, 11,  -1,  14,  11,  -18,
  -19, -8,  10,  20,  0,   10,  -10, -40, -23, -3,  12,  30,  -45, -18, -14,
  -26, -10, 2,   21,  50,  -9,  9,   -8,  -18, -8,  -14, -4,  20,  -5,  8,
  -7,  2,   1,   2,   -6,  6,   10,  -16, 7,   8,   -12, 4,   10,  -9,  5,
  4,   0,   -23, 32,  -22, -7,  14,  -12, -8,  6,   4,   -18, -14, 42,  -15,
  41,  -17, -34, 13,  4,   -9,  -5,  16,  -20, -18, 25,  14,  -16, -16, 4,
  39,  -30, 1,   10,  -19, -16, -16, -8,  21,  8,   2,   -10, -9,  -7,  4,
  10,  10,  -10, 14,  -14, 9,   -4,  -4,  9,   -6,  18,  -24, 20,  -10, -2,
  12,  -22, 14,  -10, 11,  -2,  -8,  20,  -30, 44,  -31, -16, 15,  -16, 2,
  34,  -38, 16,  -1,  -16, 14,  0,   -10, 0,   16,  2,   -14, -19, -14, 10,
  10,  7,   22,  0,   -26, 12,  -2,  8,   6,   -6,  -8,  2,   -6,  -24, -21,
  -10, -2,  0,   9,   19,  22,  3,   -3,  2,   -4,  6,   -5,  6,   -3,  2,
  0,   -5,  16,  -22, 20,  -21, 12,  -19, 27,  -30, 14,  1,   0,   10,  -10,
  -15, 31,  -20, 8,   2,   -27, 12,  9,   -12, -4,  -4,  2,   12,  10,  0,
  -18, 10,  20,  19,  -16, -32, -8,  -5,  21,  -14, -3,  7,   12,  0,   -1,
  -1,  -16, 40,  34,  24,  14,  -2,  -14, -26, -33, -12, 18,  -24, 26,  -24,
  15,  -4,  0,   15,  -19, 22,  -26, 32,  -28, 20,  -10, 10,  -26, 32,  -22,
  12,  -18, 18,  -7,  24,  -18, 7,   -8,  8,   -6,  14,  -7,  -13, 0,   4,
  2,   -2,  -9,  9,   -8,  22,  20,  6,   -16, -23, -6,  7,   7,   13,  2,
  5,   6,   2,   -3,  -10, -14, 19,  15,  20,  17,  8,   -4,  -15, -29, -1,
  7,   -16, 13,  -2,  -4,  4,   -2,  1,   -9,  24,  -14, -8,  18,  -16, 6,
  20,  0,   -30, 24,  5,   -23, 8,   6,   -26, 19,  15,  -28, 4,   10,  5,
  -22, 14,  0,   -2,  4,   22,  -33, -25, 31,  40,  23,  -40, -16, 25,  -4,
  -16, 14,  3,   10,  -6,  -6,  2,   6,   -7,  -18, -8,  2,   -6,  -3,  5,
  2,   2,   2,   8,   -2,  -8,  12,  -8,  4,   2,   -2,  -22, 15,  8,   -16,
  13,  -8,  0,   2,   41,  -34, 0,   14,  -8,  0,   10,  -10, -29, 14,  14,
  -20, 2,   3,   -19, 21,  6,   8,   -7,  -17, 11,  16,  -20, 6,   -43, -18,
  22,  24,  10,  3,   -10, -6,  -8,  6,   18,  10,  2,   -8,  -16, -14, 40,
  30,  -3,  -22, -10, -7,  -8,  4,   0,   -2,  0,   2,   -2,  1,   3,   -3,
  -2,  2,   2,   -6,  4,   -2,  -5,  8,   -3,  2,   -12, 6,   -1,  0,   16,
  -13, 5,   -12, 26,  -13, -10, 4,   -32, 36,  3,   10,  -16, -8,  16,  11,
  -2,  -10, -18, 10,  0,   12,  -18, -46, -13, 56,  13,  -1,  4,   17,  -14,
  -10, 16,  -12, -38, -34, 10,  24,  6,   14,  8,   -8,  -4,  4,   -2,  -1,
  3,   -6,  6,   -2,  14,  -18, 12,  -2,  -9,  20,  -22, 10,  -18, 27,  -18,
  7,   4,   -25, 28,  -12, 28,  -44, 35,  -14, -8,  30,  -31, 12,  27,  -21,
  20,  -9,  -22, 6,   -6,  8,   -1,  -16, 2,   6,   -12, 16,  22,  -12, 1,
  -1,  -16, -4,  6,   -1,  -2,  13,  27,  16,  -8,  -9,  -6,  0,   -5,  -12,
  -4,  6,   -5,  2,   0,   2,   -1,  1,   11,  -15, 6,   2,   -4,  0,   4,
  -3,  -20, 20,  -3,  -9,  7,   2,   -8,  7,   26,  -26, 3,   8,   2,   -7,
  2,   -5,  -26, 12,  24,  -21, 18,  -4,  2,   -4,  -40, 24,  -20, -4,  57,
  -4,  -42, 17,  -36, 10,  10,  16,  0,   -17, -10, 18,  4,   22,  -1,  -11,
  5,   1,   -10, -5,  -10, 14,  -16, 13,  -10, 8,   -6,  2,   16,  -22, 21,
  -18, 18,  -19, 16,  -6,  -18, 22,  -19, 8,   -2,  10,  -8,  1,   -8,  23,
  -34, 36,  -30, 10,  -12, 16,  -6,  0,   3,   -4,  -14, 36,  -16, -6,  4,
  -2,  -12, 8,   6,   -26, 2,   18,  27,  14,  -20, -32, 10,  14,  -14, -3,
  17,  4,   -17, -24, 1,   3,   5,   15,  6,   -10, 12,  -10, 8,   -6,  2,
  -1,  -8,  16,  -21, 20,  -18, 14,  -8,  5,   6,   -17, 23,  -16, 8,   -4,
  5,   -10, 16,  -14, 16,  -18, 21,  -30, 17,  -2,  -6,  3,   11,  -23, 14,
  10,  -2,  -10, -2,  6,   -1,  -7,  -4,  -18, -8,  26,  36,  27,  -28, -40,
  16,  33,  -14, -9,  13,  10,  -30, -22, 6,   10,  6,   0,   -2,  1,   0,
  0,   -1,  2,   -1,  -1,  0,   -1,  2,   -3,  6,   -6,  1,   2,   3,   -1,
  -6,  16,  -20, 14,  0,   -10, -7,  6,   3,   -12, 33,  -29, 1,   4,   27,
  -27, 6,   18,  -24, -8,  38,  -30, 26,  -30, -20, 32,  23,  -24, -10, 12,
  8,   -2,  -2,  12,  17,  -26, -35, 32,  1,   4,   -4,  4,   14,  3,   -10,
  -12, 0,   1,   -2,  2,   0,   0,   0,   0,   2,   -5,  7,   -5,  2,   -3,
  2,   -2,  2,   1,   -8,  13,  -8,  3,   1,   -2,  -6,  10,  4,   -5,  -5,
  8,   -9,  4,   29,  -25, -4,  27,  -20, -4,  30,  -24, -38, 26,  28,  -36,
  2,   26,  -16, -6,  -8,  28,  20,  -30, 0,   28,  -4,  -16, -33, 6,   -8,
  -8,  35,  18,  -12, -13, 0,   1,   -1,  2,   -2,  2,   0,   1,   1,   1,
  -4,  4,   -4,  0,   0,   -1,  -1,  -4,  6,   -7,  12,  -10, 12,  -6,  12,
  -7,  -2,  2,   -4,  2,   -10, 10,  8,   -12, -10, 21,  -10, -10, 39,  -28,
  10,  0,   -21, 11,  9,   -12, -12, 9,   -23, -2,  -4,  10,  8,   26,  20,
  -51, -2,  24,  16,  -18, -44, -32, 16,  48,  3,   -4,  5,   -6,  6,   -4,
  2,   0,   -8,  12,  -15, 16,  -16, 12,  -9,  3,   14,  -22, 28,  -30, 30,
  -30, 23,  -9,  0,   14,  -22, 17,  -14, 15,  -20, 12,  6,   -4,  -2,  24,
  -43, 31,  -22, 14,  14,  3,   -15, -14, 24,  1,   -28, 14,  11,  -16, 16,
  6,   4,   -16, -1,  10,  -5,  4,   6,   -2,  18,  2,   -23, -6,  -1,  0,
  0,   0,   0,   0,   0,   0,   0,   0,   1,   0,   0,   0,   0,   0,   1,
  -2,  2,   -2,  2,   1,   -2,  0,   5,   -5,  0,   6,   -4,  -4,  5,   2,
  3,   -14, 31,  -32, 7,   16,  -23, 10,  24,  -30, 15,  15,  -12, -8,  4,
  0,   -38, 26,  8,   0,   12,  16,  -20, -18, -43, 8,   6,   26,  38,  -34,
  -38, 32,  1,   -2,  2,   -2,  1,   -2,  2,   -1,  -2,  4,   -4,  3,   -4,
  6,   -7,  4,   2,   -3,  4,   -8,  12,  -18, 18,  -8,  -4,  8,   -9,  10,
  -16, 22,  -22, 13,  -20, 34,  -34, 7,   20,  -30, 22,  -7,  -4,  -2,  2,
  6,   4,   -3,  12,  -12, -23, 30,  -14, -24, 42,  7,   -52, 27,  0,   -13,
  14,  26,  -11, -5,  2,   -10, 0,   0,   0,   0,   0,   0,   0,   0,   0,
  2,   -2,  0,   2,   0,   -1,  2,   1,   -2,  4,   -2,  0,   -1,  3,   -2,
  0,   1,   -8,  6,   2,   0,   -6,  4,   -11, 10,  8,   -13, -6,  4,   1,
  3,   34,  -34, -10, 22,  5,   -6,  4,   -2,  -39, 23,  33,  -22, -26, 20,
  14,  -13, -12, 13,  14,  -24, -12, 52,  27,  -55, -2,  2,   -2,  2,   -2,
  1,   0,   0,   2,   -2,  2,   -3,  3,   -2,  1,   -2,  -4,  4,   -2,  1,
  -1,  0,   0,   2,   2,   -4,  -2,  9,   -10, 17,  -14, 1,   -10, 11,  0,
  -12, 22,  -24, 20,  -7,  34,  -48, 36,  -14, -9,  44,  -66, 30,  20,  -11,
  -2,  2,   -18, 6,   -2,  9,   11,  -2,  -16, -2,  -1,  4,   -6,  13,  0,
  0,   1,   -1,  1,   -1,  0,   0,   -1,  2,   -3,  4,   -4,  4,   -2,  1,
  2,   -1,  2,   -6,  10,  -11, 10,  -4,  -2,  4,   -8,  14,  -16, 10,  -8,
  4,   -6,  16,  -14, -5,  24,  -35, 30,  -10, 2,   0,   -13, 19,  -4,  -24,
  34,  -16, 6,   -8,  0,   16,  -26, -6,  26,  -4,  4,   24,  -40, -27, 55,
  11,  -38, 9,   0,   0,   0,   -1,  2,   -1,  0,   0,   1,   -2,  1,   0,
  -1,  0,   0,   0,   -6,  13,  -12, 9,   -6,  4,   -4,  1,   10,  -18, 18,
  -8,  4,   -6,  6,   -6,  -16, 27,  -24, 14,  0,   3,   -10, 4,   4,   -2,
  4,   -2,  -2,  -8,  10,  -2,  28,  -46, 40,  -16, 0,   25,  -37, 14,  -30,
  26,  40,  -37, -8,  10,  -27, 22,  0,   0,   0,   0,   0,   0,   0,   0,
  0,   0,   0,   0,   -1,  2,   -2,  0,   -3,  4,   -4,  4,   -4,  1,   2,
  -1,  6,   -8,  9,   -10, 8,   -3,  -2,  1,   -10, 12,  -4,  10,  -16, 6,
  4,   -4,  6,   0,   -11, 0,   20,  -13, 4,   -1,  -14, -10, 55,  -26, -32,
  36,  -7,  -6,  52,  -45, -33, 38,  8,   -20, -10, 12,  0,   -1,  0,   1,
  -1,  1,   0,   0,   1,   -1,  2,   -2,  4,   -4,  2,   -2,  -4,  7,   -9,
  10,  -10, 8,   -6,  3,   12,  -19, 18,  -15, 12,  -8,  8,   -6,  -28, 42,
  -46, 40,  -28, 23,  -13, 6,   10,  -10, -9,  15,  -18, 23,  -17, 6,   -21,
  28,  -18, -8,  25,  -26, 28,  -16, 3,   8,   -17, -6,  25,  -2,  -12, 4,
  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
  0,   -2,  3,   -2,  0,   0,   1,   -1,  0,   2,   -3,  2,   1,   -4,  3,
  -4,  2,   -7,  10,  -9,  4,   -2,  2,   -4,  2,   5,   -10, 16,  -16, 12,
  -12, 6,   0,   10,  -23, 16,  2,   4,   -2,  -6,  0,   -26, 50,  -42, 16,
  18,  -55, 67,  -32, 0,   0,   0,   0,   0,   0,   0,   0,   0,   -2,  1,
  0,   0,   0,   -1,  0,   -2,  4,   -4,  2,   -2,  1,   0,   0,   2,   -5,
  6,   -3,  2,   -2,  0,   2,   0,   3,   -1,  -6,  6,   -5,  4,   -2,  16,
  -30, 47,  -52, 49,  -40, 20,  -6,  -1,  -2,  6,   -18, 38,  -36, 34,  -21,
  12,  -20, 16,  -12, 0,   8,   -9,  6,   0,   0,   0,   0,   -1,  0,   0,
  0,   1,   -1,  1,   -1,  2,   -1,  0,   0,   0,   0,   0,   2,   -2,  2,
  -1,  0,   0,   -2,  2,   -4,  4,   -4,  2,   0,   -3,  10,  -15, 18,  -16,
  13,  -10, 4,   5,   -10, 24,  -29, 26,  -20, 14,  -6,  -6,  19,  -36, 44,
  -37, 26,  -16, 6,   -13, 28,  -30, 32,  -38, 36,  -24, 8,   0,   0,   0,
  0,   -1,  0,   0,   0,   1,   0,   0,   0,   1,   -1,  1,   0,   0,   -1,
  0,   0,   0,   1,   -1,  1,   0,   2,   -4,  3,   -3,  2,   0,   0,   2,
  -7,  10,  -10, 8,   -4,  2,   -1,  -4,  8,   -14, 15,  -11, 8,   -3,  0,
  8,   -22, 32,  -38, 38,  -28, 20,  -8,  -17, 34,  -41, 50,  -44, 36,  -26,
  8
};

static const int32_t mdt8x8_mode3[4096] = {
  2,   1,   2,   2,   3,   3,   4,   6,   2,   2,   4,   5,   6,   8,   11,
  15,  4,   6,   6,   7,   10,  13,  17,  20,  6,   8,   7,   10,  14,  18,
  20,  20,  8,   8,   11,  16,  19,  22,  23,  21,  9,   12,  16,  20,  24,
  25,  24,  22,  12,  16,  20,  22,  25,  26,  24,  22,  16,  20,  22,  23,
  24,  25,  23,  22,  3,   4,   7,   6,   6,   7,   7,   6,   10,  11,  12,
  12,  16,  18,  14,  10,  15,  14,  14,  18,  24,  20,  14,  4,   15,  19,
  19,  22,  24,  16,  2,   -10, 18,  22,  24,  22,  16,  1,   -14, -19, 21,
  22,  21,  14,  2,   -12, -21, -22, 18,  17,  10,  -1,  -12, -20, -24, -24,
  12,  7,   -2,  -13, -21, -24, -24, -23, 2,   1,   6,   10,  11,  8,   2,
  -4,  8,   10,  18,  22,  20,  10,  -4,  -12, 20,  24,  24,  23,  14,  -6,
  -17, -14, 27,  30,  22,  8,   -10, -24, -18, -3,  28,  22,  8,   -10, -26,
  -22, -2,  10,  20,  6,   -10, -20, -18, 0,   15,  18,  4,   -12, -21, -20,
  -4,  16,  22,  18,  -9,  -20, -18, -8,  6,   18,  21,  17,  2,   2,   7,
  13,  8,   -4,  -8,  -1,  10,  16,  22,  18,  0,   -14, -8,  6,   22,  30,
  22,  -1,  -21, -16, 6,   11,  25,  25,  -1,  -28, -22, 6,   16,  2,   20,
  0,   -27, -26, 8,   26,  10,  -8,  2,   -23, -26, 6,   30,  17,  -5,  -11,
  -16, -22, 0,   25,  20,  -4,  -16, -16, -17, -2,  16,  16,  -4,  -15, -17,
  -17, -2,  4,   6,   2,   -6,  -8,  -4,  -4,  4,   12,  8,   -4,  -10, -7,
  -8,  -16, 18,  16,  -2,  -14, -8,  -3,  -21, -31, 23,  8,   -18, -15, 3,
  -7,  -36, -34, 10,  -10, -16, 4,   12,  -18, -34, -16, -5,  -8,  12,  24,
  1,   -21, -9,  8,   0,   18,  36,  20,  -10, -8,  14,  18,  20,  37,  28,
  3,   -2,  12,  18,  13,  -4,  -6,  -14, -9,  3,   4,   -9,  -16, -12, -18,
  -14, 6,   6,   -10, -24, -22, -20, -15, 8,   19,  -9,  -28, -24, -12, -14,
  2,   24,  6,   -26, -22, -6,  -6,  2,   20,  16,  -16, -23, 4,   6,   -15,
  18,  24,  2,   -14, 4,   16,  -5,  -19, 27,  24,  7,   14,  24,  7,   -14,
  -16, 27,  24,  22,  28,  16,  -3,  -12, -13, -10, -19, -18, -5,  0,   -6,
  -1,  12,  -28, -31, -14, -2,  -5,  -1,  12,  10,  -34, -17, 10,  2,   -6,
  15,  15,  -7,  -13, 19,  20,  -7,  4,   22,  -4,  -22, 20,  30,  -2,  -10,
  18,  6,   -28, -16, 26,  0,   -23, 5,   16,  -20, -22, 8,   3,   -26, -12,
  18,  0,   -18, 6,   22,  -17, -19, 8,   12,  -6,  5,   22,  20,  8,   0,
  -2,  2,   -2,  -20, -18, 1,   7,   -2,  -2,  -6,  -24, -39, -16, 20,  6,
  4,   -2,  -20, -35, -24, 14,  28,  12,  10,  -6,  -22, -17, 6,   19,  12,
  14,  16,  2,   -6,  6,   8,   0,   4,   22,  26,  10,  -3,  -4,  -6,  -4,
  8,   33,  24,  -7,  -24, -20, -10, 4,   14,  30,  2,   -27, -28, -14, -1,
  8,   15,  10,  8,   4,   18,  29,  12,  -4,  -2,  6,   8,   23,  38,  26,
  -3,  2,   16,  -18, 2,   36,  28,  -4,  -4,  20,  12,  -33, -14, 14,  0,
  -12, 10,  10,  -14, -40, -16, -12, -20, -3,  6,   -13, -16, -30, -5,  -5,
  -11, -8,  -11, -10, 6,   -2,  16,  6,   -8,  -12, -16, 4,   22,  18,  17,
  2,   -6,  -3,  4,   11,  16,  15,  24,  -1,  -24, -10, 0,   -2,  10,  40,
  20,  -26, -23, -2,  -3,  9,   24,  44,  -5,  -28, 7,   4,   -8,  16,  12,
  12,  -8,  10,  18,  -10, -4,  3,   -22, -12, 3,   20,  -8,  -14, 4,   -18,
  -36, -11, 2,   -8,  -20, 4,   2,   -22, -16, -2,  -6,  -18, 4,   20,  0,
  -6,  14,  0,   -6,  4,   24,  14,  3,   14,  26,  -10, -6,  26,  22,  -12,
  -12, 10,  17,  -14, 11,  40,  5,   -27, 3,   23,  0,   -4,  14,  8,   -22,
  -12, 22,  8,   -29, -7,  -13, -16, -12, 3,   12,  -16, -29, -17, -8,  3,
  -7,  -4,  6,   -10, -10, 4,   25,  6,   -18, 4,   18,  3,   -2,  28,  13,
  -22, -4,  27,  14,  -2,  -1,  13,  -28, -22, 24,  24,  -1,  -8,  -7,  12,
  26,  18,  10,  8,   -4,  -14, -12, 27,  24,  2,   5,   10,  -10, -33, -32,
  8,   -12, -12, 2,   2,   -6,  -26, -30, -25, -22, 3,   2,   4,   12,  0,
  -1,  -20, 14,  16,  4,   21,  21,  8,   20,  12,  24,  4,   16,  25,  -1,
  0,   19,  12,  -12, -8,  20,  -2,  -23, 1,   14,  -18, -30, 0,   2,   -24,
  -15, 8,   10,  26,  33,  -4,  -8,  2,   5,   24,  28,  34,  18,  -10, 3,
  -2,  3,   36,  28,  -10, -19, 0,   0,   -12, 2,   4,   0,   -29, -12, -4,
  -18, -6,  -14, -25, -1,  10,  14,  -24, -19, -2,  -20, -2,  18,  36,  8,
  -16, -2,  -10, -4,  26,  12,  14,  1,   13,  8,   -10, 6,   11,  -10, -10,
  11,  20,  0,   -4,  -4,  -16, -20, 19,  8,   -12, 7,   5,   -28, -22, 2,
  20,  -12, -6,  26,  -6,  -37, -12, 2,   0,   -18, 10,  11,  -15, -2,  6,
  -13, -6,  0,   10,  -2,  8,   21,  -2,  -24, 3,   10,  12,  16,  14,  0,
  -7,  -16, -6,  6,   23,  13,  -13, 2,   12,  -16, -32, -3,  12,  -12, -4,
  34,  12,  -26, -32, -8,  -10, -8,  32,  36,  -4,  -20, 10,  -16, -17, 14,
  26,  18,  20,  15,  6,   -28, -10, 18,  17,  13,  18,  12,  2,   -16, -8,
  -4,  -4,  -16, -12, -2,  4,   -3,  -18, -16, -18, -28, -21, -12, 5,   -6,
  -1,  12,  4,   6,   -3,  -21, -4,  6,   24,  27,  33,  38,  6,   -14, -9,
  8,   7,   -4,  14,  12,  -6,  14,  -7,  -12, -28, -22, -16, -24, -1,  30,
  -30, 4,   25,  0,   -17, -10, -4,  6,   -34, 18,  28,  2,   -8,  -22, -6,
  34,  -13, 0,   0,   16,  7,   -28, -5,  34,  2,   -26, -9,  23,  0,   -26,
  -6,  0,   10,  2,   7,   6,   -10, -8,  -4,  -14, 11,  25,  18,  -1,  -6,
  3,   4,   4,   -21, 6,   20,  10,  -4,  -10, 4,   17,  -48, -8,  18,  6,
  -6,  -12, -4,  6,   34,  18,  6,   2,   0,   20,  10,  -31, 14,  14,  16,
  -14, -10, 18,  -6,  -28, -34, 6,   10,  -24, 2,   4,   -4,  10,  -18, 2,
  -16, -4,  18,  4,   14,  10,  27,  4,   -20, 6,   2,   11,  8,   -32, 27,
  2,   2,   -10, -20, 12,  -14, -36, -8,  3,   9,   -18, -5,  4,   -10, 10,
  -19, 4,   4,   4,   17,  3,   8,   36,  -18, 15,  20,  12,  26,  21,  -4,
  -1,  -18, -4,  -13, 13,  43,  12,  -13, 4,   5,   -28, -40, 0,   15,  8,
  2,   4,   30,  -20, -38, -25, -4,  24,  12,  -6,  27,  10,  -16, -30, -2,
  14,  -4,  -4,  4,   22,  6,   -14, -11, -14, -7,  4,   -4,  8,   2,   1,
  -3,  -5,  3,   -6,  4,   -4,  -6,  6,   18,  18,  3,   -16, -2,  10,  24,
  18,  -20, -17, 23,  32,  -3,  -8,  1,   4,   -14, -3,  16,  -3,  -4,  -15,
  -10, -4,  -2,  12,  -6,  -36, 8,   14,  16,  -5,  -16, 14,  17,  -10, 6,
  22,  22,  -18, -28, 24,  40,  3,   -20, -1,  10,  -16, -16, 12,  5,   -9,
  -27, -2,  17,  -5,  -16, -10, -10, -1,  0,   25,  16,  -13, -26, -8,  18,
  19,  -18, 16,  28,  -26, -24, 30,  17,  -9,  -14, 20,  7,   -24, -3,  19,
  -1,  -4,  -8,  1,   -3,  5,   -6,  -16, -6,  8,   -16, 6,   20,  -4,  -16,
  2,   -2,  -16, -6,  8,   8,   -11, 16,  27,  -12, -22, 0,   -8,  -8,  10,
  28,  14,  2,   2,   -3,  1,   -3,  -9,  -4,  21,  24,  -8,  2,   10,  -16,
  -45, -11, 34,  11,  -32, -16, 0,   24,  40,  21,  4,   6,   12,  -4,  9,
  8,   14,  5,   3,   8,   2,   4,   -3,  -19, -22, -22, -5,  0,   11,  -16,
  -4,  6,   -7,  -20, -19, 11,  22,  -10, -2,  26,  29,  -12, -27, 4,   -4,
  17,  -15, -2,  26,  -2,  -26, -22, -29, 18,  -27, -12, 14,  0,   10,  -4,
  -23, 3,   4,   14,  -2,  4,   28,  26,  6,   10,  2,   12,  8,   -26, -26,
  1,   1,   2,   -18, 12,  26,  -10, -14, 6,   -8,  8,   -33, -4,  40,  20,
  -7,  -1,  -5,  14,  -31, -12, 28,  16,  -5,  2,   0,   22,  -32, -26, 4,
  7,   10,  7,   -13, 26,  -26, -29, 0,   10,  12,  0,   -18, 26,  -7,  -10,
  -2,  -6,  4,   6,   -4,  23,  2,   -2,  -10, -16, 8,   20,  0,   -12, -12,
  -20, -21, -1,  30,  18,  -22, 2,   -10, 2,   6,   -21, 15,  31,  -34, 32,
  -6,  17,  18,  -42, -6,  32,  -16, 20,  -26, -1,  2,   -23, 4,   26,  0,
  -2,  -16, 0,   2,   -7,  4,   11,  -4,  11,  15,  16,  6,   -14, -14, 2,
  2,   9,   6,   17,  12,  -14, -12, 8,   4,   -24, -21, 7,   4,   -5,  7,
  6,   -7,  19,  2,   18,  5,   -17, 26,  40,  -7,  8,   -28, 20,  16,  -30,
  -6,  10,  -4,  6,   -22, 0,   13,  -5,  -31, -21, 22,  10,  18,  -6,  -4,
  24,  -6,  -20, 27,  -12, 32,  4,   -10, 23,  6,   -14, 12,  -31, 6,   8,
  0,   -6,  -14, -10, 2,   -11, -12, -6,  10,  -6,  -16, -7,  -2,  19,  -10,
  -6,  22,  20,  8,   -2,  -4,  19,  -30, 4,   28,  -21, -24, -14, -36, 22,
  -24, 7,   5,   -6,  18,  2,   -13, 14,  -2,  -10, -12, 23,  28,  16,  30,
  -12, 0,   -4,  -13, -7,  -6,  -4,  16,  -14, 14,  5,   -30, -22, -14, -24,
  -10, -3,  20,  0,   -10, 14,  9,   -1,  -4,  -7,  8,   14,  9,   4,   10,
  24,  -2,  -13, -1,  16,  -7,  -31, 2,   15,  -20, 34,  34,  10,  2,   4,
  -2,  -12, -4,  -5,  6,   10,  -4,  -10, 8,   7,   -12, -36, -18, 6,   0,
  -19, 8,   25,  -6,  18,  -11, 4,   16,  -22, -14, 8,   8,   40,  -8,  13,
  14,  -13, -19, -22, 22,  -14, -3,  11,  2,   24,  -4,  -24, 26,  -33, 9,
  -11, 4,   30,  -4,  -4,  3,   13,  6,   -16, 4,   -7,  -6,  7,   -20, 48,
  -29, -20, 8,   -13, 6,   30,  24,  10,  -7,  3,   -5,  8,   2,   -17, 21,
  -16, 28,  -2,  -11, 18,  -17, -30, 3,   1,   -3,  -8,  4,   -12, 5,   18,
  -20, 6,   -28, 10,  8,   -16, 16,  17,  -6,  8,   1,   8,   0,   2,   -19,
  -16, 22,  6,   10,  0,   4,   -4,  -14, 1,   0,   -8,  -17, 6,   12,  -4,
  27,  16,  -36, -10, -6,  -18, 4,   14,  -2,  9,   20,  -4,  5,   -7,  8,
  -4,  -4,  11,  -7,  14,  12,  4,   0,   -12, 2,   -18, -8,  6,   -16, 4,
  6,   10,  5,   -20, 32,  -4,  -10, -2,  -2,  26,  10,  -15, 26,  4,   28,
  -22, -36, 26,  3,   -36, -8,  -14, 33,  -9,  -30, 7,   6,   -16, -14, -32,
  23,  18,  -10, -6,  18,  22,  4,   6,   -18, 11,  36,  29,  24,  -2,  -22,
  2,   -12, 0,   -5,  -9,  -1,  0,   2,   6,   -8,  -20, -24, -22, -13, 9,
  6,   7,   -10, 12,  24,  8,   3,   -10, -28, 11,  -1,  22,  24,  16,  16,
  -4,  -10, 6,   -10, -20, -24, -4,  16,  28,  24,  -6,  -9,  -18, -26, -16,
  -4,  16,  10,  2,   20,  32,  14,  -8,  -15, -18, -16, -17, -30, 14,  20,
  -28, -10, 16,  -6,  22,  0,   -6,  8,   0,   4,   2,   -12, 22,  -6,  -10,
  8,   6,   1,   -4,  4,   -27, -12, 16,  -8,  -16, 8,   8,   -4,  12,  0,
  -2,  0,   -5,  0,   0,   4,   28,  -12, -7,  14,  4,   -22, -11, 30,  -20,
  11,  1,   -12, 20,  -10, -25, 26,  -11, 32,  -24, -14, 42,  -3,  -34, 8,
  6,   -26, -34, -4,  20,  2,   -12, -4,  0,   18,  31,  -10, -15, 0,   10,
  5,   2,   3,   -3,  5,   8,   -10, 12,  -16, -4,  -18, -41, 20,  18,  -20,
  14,  -20, -8,  47,  -6,  -10, -6,  -4,  22,  1,   -3,  19,  -7,  6,   6,
  -3,  -3,  5,   -13, -32, -12, 8,   14,  -5,  -16, 0,   14,  27,  0,   -32,
  1,   22,  2,   -4,  27,  -8,  28,  -16, -18, 30,  -4,  -16, -10, -23, 24,
  -8,  4,   0,   -21, 26,  7,   -14, 2,   4,   9,   -3,  12,  -11, 10,  0,
  0,   -8,  -15, 15,  10,  -30, -10, -1,  -4,  3,   1,   -28, 0,   34,  0,
  8,   -16, 11,  16,  -11, 0,   0,   8,   8,   2,   -22, 2,   26,  -27, -27,
  -10, -8,  30,  -5,  -7,  4,   -12, 39,  8,   -33, 11,  18,  1,   -14, -4,
  36,  6,   6,   7,   -39, 12,  25,  -18, -4,  4,   -2,  6,   2,   -4,  -9,
  10,  -17, -2,  -18, 14,  26,  -25, -22, 18,  12,  8,   11,  -20, -12, 30,
  4,   -20, 11,  -4,  9,   -4,  -2,  6,   4,   2,   -22, -16, -3,  23,  0,
  -36, -3,  22,  -15, 18,  -14, -12, 18,  21,  0,   -12, 13,  18,  4,   -18,
  2,   5,   -11, -2,  0,   -11, 8,   11,  -10, -7,  18,  -9,  4,   0,   -14,
  26,  -9,  -9,  30,  -32, 27,  34,  -46, 25,  -6,  -12, 20,  -32, 12,  8,
  -8,  24,  -16, -8,  13,  2,   -12, -9,  3,   -3,  10,  0,   -10, 18,  -6,
  8,   -16, -8,  16,  -3,  -4,  -10, 4,   7,   -2,  10,  -26, 7,   19,  -30,
  21,  -12, -4,  -6,  24,  -10, -2,  40,  -37, -1,  24,  -32, -1,  6,   -28,
  12,  3,   -10, 14,  7,   -8,  4,   -2,  -5,  8,   4,   -18, 20,  6,   -2,
  11,  4,   -18, 14,  6,   -26, 10,  7,   -25, 21,  -6,  -21, 35,  -22, 8,
  12,  -18, 21,  -14, -24, 10,  -10, 8,   8,   2,   7,   -17, 24,  -13, -12,
  8,   -13, -4,  14,  9,   6,   -33, 4,   1,   14,  32,  4,   -4,  6,   17,
  -2,  -3,  -10, -32, 4,   3,   -10, 20,  -20, 11,  0,   -14, 6,   -8,  -11,
  -14, 6,   11,  16,  36,  -14, 9,   18,  -16, 22,  -30, -20, 10,  -29, 26,
  16,  -19, 15,  -9,  -17, 2,   -6,  -11, -5,  -12, 20,  29,  16,  22,  11,
  -16, 10,  -2,  -16, -14, -13, -14, 1,   17,  -36, -16, -8,  -28, -12, 14,
  4,   10,  30,  2,   18,  10,  3,   5,   -30, 16,  16,  -18, 30,  -5,  -12,
  19,  -18, 8,   -23, -24, -8,  -18, -1,  15,  1,   2,   24,  6,   0,   18,
  -2,  -12, 0,   0,   4,   0,   20,  -10, -4,  13,  -14, 1,   -24, -25, -7,
  -20, -1,  16,  2,   6,   33,  0,   10,  24,  -22, -12, 19,  -12, -8,  -8,
  13,  4,   -2,  -1,  -44, -32, 12,  0,   -8,  -6,  -4,  19,  26,  26,  2,
  3,   2,   3,   -4,  2,   0,   8,   -17, 4,   10,  1,   -4,  -16, -41, -16,
  14,  -13, -5,  -3,  2,   24,  23,  19,  8,   -4,  14,  -5,  0,   8,   2,
  8,   -10, 2,   16,  0,   -15, -30, -40, -26, 10,  -18, -12, 10,  6,   26,
  32,  4,   14,  -4,  -20, -14, -28, -26, 14,  -23, -19, 28,  -3,  24,  26,
  -4,  24,  -11, -16, 24,  -19, 16,  9,   -8,  15,  -1,  0,   -10, -22, -22,
  -30, 0,   -8,  2,   2,   6,   28,  4,   14,  15,  -19, 12,  2,   -3,  17,
  6,   6,   11,  1,   0,   0,   -26, -20, -26, -33, 2,   -1,  -8,  8,   10,
  16,  22,  4,   -2,  -10, 12,  2,   -24, 18,  -21, -20, 20,  -22, 19,  22,
  -8,  6,   6,   13,  2,   -7,  0,   -12, 7,   3,   3,   -4,  -3,  18,  -12,
  -4,  1,   -10, -15, 5,   -1,  -14, 14,  16,  -9,  12,  4,   -1,  4,   5,
  -5,  -10, 12,  -4,  12,  -3,  -15, 40,  -32, -10, 24,  -54, 13,  12,  -42,
  25,  -10, -14, 24,  3,   -2,  4,   2,   6,   6,   -8,  -10, 30,  -10, -8,
  11,  -12, 12,  24,  -10, -24, 18,  4,   -16, 10,  -9,  -22, 24,  -10, -2,
  -2,  4,   12,  -13, -1,  4,   0,   6,   -1,  -8,  -4,  18,  14,  -8,  -11,
  13,  -2,  -2,  1,   -11, -19, 26,  -6,  -10, 4,   10,  -12, 2,   1,   -18,
  10,  4,   -4,  8,   -19, 37,  21,  -30, 33,  -23, -8,  38,  -42, -3,  -6,
  -8,  14,  18,  -21, 2,   28,  -16, 15,  0,   -28, -10, 24,  -12, -21, 14,
  -12, -6,  32,  -10, -13, 12,  15,  -6,  24,  -8,  -4,  16,  1,   -10, -2,
  -7,  -8,  8,   -18, -4,  5,   -2,  -17, 20,  -10, -8,  32,  -6,  -13, 34,
  -10, 0,   39,  -26, -10, 8,   10,  -18, -12, 0,   -28, 26,  -2,  -16, 9,
  6,   14,  -9,  10,  12,  10,  -24, 19,  14,  6,   -9,  -15, -24, 9,   0,
  0,   -40, 8,   8,   16,  10,  10,  -34, 37,  10,  8,   -18, 6,   -20, 24,
  -8,  -6,  -4,  -2,  12,  -14, -7,  6,   -5,  -13, -9,  -2,  8,   28,  8,
  -8,  13,  19,  20,  0,   -24, -18, -18, 14,  -12, -16, -32, 6,   22,  9,
  10,  -14, 4,   24,  2,   10,  -22, 0,   -30, 10,  1,   22,  -15, -2,  2,
  6,   30,  8,   -34, 10,  -14, 26,  -14, -5,  -35, 11,  1,   24,  -30, 9,
  -6,  8,   -4,  19,  -25, 9,   10,  -10, 12,  11,  11,  -4,  -7,  -6,  1,
  3,   0,   -20, -20, 10,  26,  -6,  -4,  0,   -8,  19,  17,  -2,  -38, 18,
  2,   -12, 20,  -7,  -20, 24,  9,   -8,  4,   10,  -20, 48,  -26, 22,  -9,
  -20, 8,   -24, 7,   -34, 14,  -12, 8,   20,  9,   4,   4,   10,  9,   -14,
  16,  -35, 7,   -10, 0,   8,   -11, 10,  -8,  0,   12,  -14, 10,  -16, 15,
  -10, 13,  21,  -17, 23,  -14, 4,   8,   -10, -7,  -20, -2,  -1,  -8,  -2,
  -13, 16,  2,   14,  14,  -12, 28,  1,   10,  -14, -2,  4,   -28, 26,  -24,
  -6,  12,  8,   2,   -16, -15, -22, -14, 10,  -23, -2,  -6,  22,  20,  35,
  13,  -4,  2,   30,  -26, 13,  -44, -10, -14, 10,  -13, 10,  -19, 20,  -12,
  16,  -6,  -1,  -20, 13,  -5,  18,  16,  8,   6,   4,   22,  6,   -14, -14,
  -26, -24, 2,   -4,  -24, -3,  9,   14,  25,  25,  -4,  5,   10,  5,   -14,
  4,   -24, -6,  4,   -10, -16, -21, -18, -14, 4,   -4,  -26, 18,  21,  32,
  28,  14,  -7,  10,  26,  -14, -25, -22, -29, -4,  12,  -12, -17, 8,   3,
  8,   6,   -7,  -9,  7,   2,   14,  14,  16,  12,  10,  -2,  10,  9,   -28,
  -22, -28, -22, 8,   2,   -17, -14, 24,  24,  24,  17,  -11, -4,  18,  10,
  -14, -10, -15, -6,  15,  -4,  -8,  -2,  -2,  0,   8,   21,  10,  14,  -18,
  -22, 6,   4,   -21, -12, -36, 5,   10,  38,  -11, 5,   1,   38,  -2,  21,
  -34, -20, 4,   8,   -14, 6,   -13, 8,   6,   7,   -2,  -3,  -6,  -16, -3,
  -6,  17,  8,   -2,  -1,  20,  18,  22,  -12, -22, -28, 7,   -2,  -21, -18,
  -15, 10,  32,  26,  -10, 14,  0,   16,  2,   -4,  -18, -10, -8,  -14, 14,
  -11, 8,   17,  -14, 22,  22,  6,   -11, 14,  -24, -10, 4,   -24, -29, 10,
  -2,  3,   14,  10,  -6,  16,  19,  -17, 10,  -12, 10,  -14, 16,  -8,  5,
  -6,  14,  -26, 16,  -28, 12,  -26, -14, 0,   8,   -8,  34,  -8,  11,  30,
  24,  -19, 15,  -16, -17, 3,   -8,  -28, -13, 10,  -6,  3,   22,  -24, 21,
  6,   8,   6,   -18, 18,  -12, 4,   10,  -3,  -22, 14,  -6,  4,   -4,  8,
  -24, 10,  16,  -6,  -6,  6,   -4,  -4,  22,  -14, -14, 0,   19,  -29, 38,
  -27, 14,  -6,  15,  -22, 26,  -36, 34,  -36, 16,  0,   7,   -15, 24,  -22,
  12,  7,   6,   -14, -8,  9,   -8,  7,   0,   -8,  -10, 20,  6,   -11, 7,
  -4,  -8,  20,  -12, -2,  0,   -1,  20,  -24, 25,  -34, 28,  -15, 6,   -18,
  13,  -16, 20,  -7,  5,   0,   0,   6,   -4,  12,  -22, 10,  -10, 7,   -12,
  15,  -22, 20,  -14, 8,   -5,  -1,  2,   -6,  10,  -6,  17,  -11, 12,  -3,
  8,   -12, 22,  -36, 24,  -30, 20,  -14, 2,   -14, 20,  -19, 35,  -22, 14,
  -2,  8,   -12, 16,  -20, 10,  -5,  2,   1,   -6,  16,  -32, 30,  -26, 22,
  -10, 6,   -6,  11,  -4,  9,   -20, 12,  -15, 8,   4,   1,   -10, 10,  8,
  -5,  8,   -8,  -7,  6,   4,   -6,  -6,  4,   -4,  6,   8,   -5,  -6,  12,
  -12, 12,  -14, 8,   -10, 12,  -6,  7,   1,   0,   6,   -7,  6,   -16, 18,
  -28, 23,  -24, 14,  -6,  14,  -26, 37,  -39, 42,  -32, 22,  -8,  20,  -16,
  4,   6,   -2,  14,  -8,  2,   -26, 26,  -4,  -18, 7,   -26, 16,  -8,  29,
  -38, 20,  6,   11,  5,   -5,  -1,  -20, 28,  -5,  -18, 0,   5,   -2,  10,
  8,   -16, -14, 34,  -20, -2,  6,   -18, -7,  15,  16,  -36, 24,  6,   -13,
  21,  6,   -14, -5,  20,  -16, -11, 22,  -22, -3,  10,  -2,  -7,  8,   6,
  -16, 14,  2,   9,   -9,  14,  -34, 27,  -24, 14,  -10, 7,   -18, 21,  8,
  -4,  4,   -6,  4,   0,   19,  -30, 2,   -8,  6,   -3,  8,   -14, -9,  22,
  2,   0,   -10, 8,   -18, 30,  -8,  -6,  -9,  11,  4,   -6,  14,  -33, 18,
  -10, 24,  -33, 13,  -4,  1,   -2,  22,  -31, 24,  -8,  13,  -6,  1,   -2,
  -13, 22,  -28, 20,  -20, 11,  13,  -22, 28,  -24, 14,  -13, 8,   -6,  -10,
  19,  -28, 25,  -9,  5,   0,   6,   0,   -2,  6,   0,   -17, 20,  -16, 5,
  12,  -11, 4,   -14, 31,  -32, 22,  -13, -16, 14,  0,   1,   -15, 15,  -6,
  6,   17,  -14, -5,  16,  -12, 18,  -24, 12,  -18, 20,  -4,  -12, 14,  -22,
  32,  -24, 14,  -22, 20,  -11, 6,   0,   -11, 13,  11,  10,  -1,  -16, 9,
  -3,  -8,  3,   -18, -20, 12,  17,  -12, 4,   12,  -2,  24,  28,  -26, -14,
  14,  -4,  -14, 4,   -30, -25, 37,  10,  -16, 6,   8,   -4,  30,  20,  -42,
  -3,  15,  -7,  2,   1,   -28, -12, 39,  0,   -15, 8,   -9,  4,   21,  1,
  -25, 2,   13,  -8,  13,  -10, -11, 4,   10,  -4,  -4,  3,   -5,  6,   4,
  -9,  -2,  -6,  9,   4,   12,  -14, -1,  10,  10,  4,   -13, -15, -13, 24,
  -1,  -11, -16, 4,   12,  34,  2,   -26, 2,   12,  20,  -10, -12, -45, 12,
  25,  -2,  -18, -12, 4,   19,  42,  -22, -20, 0,   18,  6,   1,   -22, -32,
  24,  12,  2,   -18, 6,   -12, 26,  13,  -14, -7,  -3,  12,  -8,  12,  -21,
  3,   3,   3,   -7,  -4,  0,   -2,  14,  -10, 0,   4,   13,  8,   -1,  6,
  -32, 28,  -10, -2,  -22, 0,   -14, 20,  24,  -22, 3,   10,  26,  -4,  18,
  -38, -13, 16,  2,   -18, -20, 2,   -12, 43,  6,   -12, -4,  20,  11,  3,
  1,   -35, -4,  10,  6,   -20, 1,   -16, 18,  6,   22,  -24, 11,  4,   -3,
  13,  -18, 6,   -18, 22,  -12, 3,   4,   4,   8,   -8,  10,  -20, 22,  -8,
  -6,  -12, -2,  -1,  2,   20,  -29, 12,  8,   20,  -6,  11,  -22, -12, 31,
  -10, -14, -19, 10,  -18, 41,  -6,  -24, 6,   22,  8,   -4,  12,  -45, 20,
  12,  0,   -28, 8,   -12, 5,   30,  -18, -10, 0,   22,  -14, 20,  -14, -12,
  8,   10,  -2,  -12, 13,  -18, 14,  0,   -2,  -4,  2,   2,   10,  6,   15,
  4,   16,  2,   4,   -3,  -20, -11, -26, -9,  -27, -6,  -8,  8,   22,  24,
  22,  26,  24,  17,  6,   -10, -29, -24, -29, -24, -26, -16, -8,  12,  28,
  26,  20,  27,  16,  20,  4,   -10, -26, -18, -14, -20, -8,  -18, 0,   6,
  18,  8,   12,  8,   9,   10,  0,   -2,  -10, 0,   -6,  -1,  -6,  0,   0,
  2,   6,   8,   6,   0,   -4,  -9,  -12, -6,  -10, -15, -8,  -2,  11,  19,
  23,  11,  15,  18,  12,  -4,  -14, -34, -26, -15, -16, -21, -12, 7,   16,
  44,  24,  16,  15,  22,  12,  -6,  -16, -44, -18, -14, -10, -22, -5,  0,
  18,  36,  10,  10,  4,   16,  0,   4,   -17, -22, -6,  -4,  0,   -8,  4,
  -6,  13,  6,   0,   -10, 8,   -13, 12,  -8,  0,   4,   -13, 18,  -15, 24,
  -23, 16,  -4,  -4,  20,  -20, 13,  -20, 17,  -8,  -6,  11,  -31, 23,  -14,
  17,  -12, 2,   15,  -17, 40,  -24, 14,  -13, 4,   1,   -18, 18,  -42, 22,
  -16, 12,  -2,  0,   16,  -16, 37,  -15, 12,  -9,  2,   -1,  -8,  9,   -25,
  8,   -9,  7,   -4,  2,   0,   -3,  10,  -4,  10,  -15, 14,  -17, 14,  -11,
  10,  5,   -12, 24,  -25, 28,  -22, 18,  -16, -1,  5,   -18, 20,  -25, 19,
  -18, 20,  -3,  5,   8,   -9,  16,  -8,  10,  -18, 8,   -16, 10,  -12, 4,
  -9,  4,   10,  -10, 21,  -19, 25,  -18, 22,  -16, 0,   10,  -20, 22,  -28,
  24,  -26, 20,  -8,  -4,  10,  -14, 19,  -18, 19,  -16, 8,   4,   -6,  10,
  -10, 10,  -10, 9,   -4,  -8,  12,  -18, 20,  -20, 20,  -17, 10,  8,   -11,
  16,  -17, 18,  -18, 18,  -14, -10, 14,  -20, 21,  -25, 21,  -24, 18,  11,
  -16, 22,  -20, 26,  -20, 24,  -20, -10, 14,  -22, 21,  -26, 19,  -22, 20,
  8,   -11, 16,  -14, 20,  -15, 18,  -16, -4,  7,   -10, 8,   -10, 8,   -8,
  6
};

static const int32_t mdt8x8_mode4[4096] = {
  8,   12,  12,  10,  10,  8,   6,   6,   7,   14,  16,  16,  14,  12,  10,
  9,   5,   12,  17,  18,  18,  16,  14,  12,  4,   10,  15,  19,  22,  22,
  19,  16,  4,   8,   13,  18,  23,  26,  24,  20,  3,   8,   11,  16,  22,
  26,  26,  24,  3,   6,   10,  14,  19,  24,  27,  27,  2,   6,   10,  13,
  16,  20,  24,  27,  -1,  -8,  -14, -16, -14, -11, -8,  -8,  6,   0,   -12,
  -18, -20, -18, -16, -12, 12,  13,  0,   -12, -20, -23, -22, -17, 11,  20,
  18,  3,   -10, -20, -24, -22, 8,   20,  26,  19,  5,   -8,  -18, -23, 7,
  16,  24,  27,  19,  5,   -7,  -17, 5,   12,  18,  26,  26,  16,  5,   -6,
  4,   9,   16,  22,  26,  22,  14,  5,   -4,  -4,  0,   10,  16,  14,  10,
  6,   -4,  -10, -10, 3,   18,  22,  18,  13,  2,   -7,  -19, -14, 4,   21,
  26,  20,  10,  8,   -10, -24, -18, 4,   20,  24,  13,  23,  11,  -14, -26,
  -18, 2,   16,  10,  24,  26,  10,  -14, -24, -16, 2,   6,   18,  28,  26,
  8,   -14, -22, -13, 4,   11,  21,  28,  22,  3,   -14, -17, -2,  3,   7,
  -2,  -13, -16, -10, -6,  -8,  -7,  8,   12,  -4,  -20, -22, -14, -4,  -18,
  -10, 16,  16,  -6,  -24, -24, 9,   -8,  -27, -8,  19,  16,  -7,  -22, 18,
  14,  -19, -30, -2,  22,  15,  -6,  17,  29,  8,   -23, -24, 5,   22,  11,
  10,  28,  29,  3,   -22, -12, 10,  16,  5,   18,  28,  20,  -3,  -15, -4,
  10,  20,  22,  12,  2,   2,   6,   8,   4,   18,  34,  30,  10,  -1,  4,
  10,  8,   6,   22,  38,  28,  6,   -3,  4,   8,   4,   4,   17,  31,  20,
  -4,  -10, -1,  10,  2,   -6,  10,  16,  -2,  -19, -16, 14,  14,  -3,  -12,
  -2,  -4,  -22, -28, 10,  22,  12,  -10, -14, -8,  -21, -34, 5,   17,  19,
  3,   -10, -11, -18, -32, -6,  -9,  -10, -6,  6,   19,  20,  11,  -10, -12,
  -8,  -16, -12, 11,  29,  28,  -12, -20, -9,  -8,  -25, -18, 14,  34,  -2,
  -22, -20, 1,   -6,  -26, -15, 14,  10,  -7,  -28, -6,  18,  0,   -22, -10,
  14,  14,  -15, -20, 12,  26,  2,   -15, 10,  20,  8,   -14, -8,  23,  26,
  1,   6,   16,  20,  5,   -8,  6,   25,  19,  2,   -18, -27, -15, 0,   8,
  10,  6,   14,  2,   -24, -34, -20, -2,  10,  16,  16,  27,  7,   -19, -23,
  -14, -4,  11,  6,   22,  26,  11,  -2,  -3,  0,   6,   0,   2,   12,  13,
  6,   14,  24,  20,  6,   0,   -3,  -5,  -10, 0,   26,  35,  10,  10,  0,
  -10, -22, -28, -6,  26,  8,   14,  10,  -2,  -15, -31, -32, -5,  2,   -10,
  -8,  6,   2,   -18, -25, -16, 6,   2,   -14, -6,  16,  3,   -26, -30, -2,
  8,   4,   -17, -4,  24,  6,   -25, -7,  -10, 11,  4,   -21, 3,   28,  8,
  6,   -20, -16, 17,  0,   -22, 8,   29,  23,  4,   -30, -8,  19,  -6,  -15,
  12,  22,  30,  -6,  -26, 4,   20,  -6,  -9,  12,  32,  24,  -7,  -11, 14,
  16,  -3,  -4,  -8,  12,  26,  18,  1,   -6,  -2,  14,  -11, -14, 18,  30,
  16,  -1,  -10, 29,  14,  -20, -14, 11,  16,  8,   -7,  18,  34,  10,  -12,
  -8,  -4,  -4,  -8,  4,   24,  23,  4,   2,   -2,  -20, -24, -2,  8,   9,
  -5,  0,   16,  -2,  -28, -1,  2,   -2,  -19, -27, 1,   24,  2,   -2,  2,
  -1,  -18, -40, -32, 12,  30,  12,  8,   -14, -4,  13,  -4,  -23, -18, 1,
  22,  2,   -22, 3,   18,  -11, -31, -19, 2,   24,  -6,  -24, 8,   18,  -11,
  -10, -18, 4,   17,  -13, -19, 13,  18,  4,   5,   -13, -2,  12,  -8,  -10,
  13,  -10, 16,  16,  -14, -6,  12,  0,   -5,  -30, -14, 30,  16,  -23, -8,
  14,  4,   -24, -39, -4,  30,  1,   -26, -1,  16,  -10, -7,  -10, -22, -20,
  -10, -3,  -4,  -10, -14, 0,   -8,  -23, -17, -6,  -2,  16,  -12, -4,  12,
  -2,  -6,  5,   8,   41,  19,  -13, 6,   15,  8,   22,  30,  28,  40,  0,
  -6,  18,  8,   10,  34,  -6,  18,  8,   -10, 12,  10,  -14, 0,   -16, -9,
  -3,  -16, -4,  18,  -8,  -32, -9,  -16, -17, -22, -20, 8,   13,  -22, 4,
  -10, -4,  -4,  -27, -12, 26,  32,  18,  10,  -12, 6,   -2,  -31, -4,  38,
  2,   26,  5,   -9,  20,  6,   -20, 7,   -17, 2,   18,  -11, -10, 21,  10,
  -6,  -5,  -14, -6,  -1,  -22, -15, 10,  5,   -4,  7,   -8,  -16, -5,  -16,
  -17, -3,  -26, 2,   23,  -8,  -12, 12,  4,   -10, -28, -29, 18,  20,  -12,
  4,   32,  17,  2,   -2,  -12, -28, -20, -13, -20, -16, 19,  4,   5,   -6,
  -19, -4,  0,   -13, 24,  19,  3,   16,  6,   2,   22,  19,  -6,  20,  -5,
  -6,  16,  2,   9,   35,  -31, -8,  2,   -31, -14, 0,   -16, 6,   -12, -28,
  0,   -14, -35, -6,  -7,  -22, 20,  -5,  -10, 8,   -6,  -6,  16,  -2,  19,
  26,  6,   10,  19,  6,   19,  28,  30,  36,  7,   -10, -1,  6,   8,   8,
  8,   32,  32,  0,   -12, -4,  1,   6,   -2,  -4,  14,  4,   -15, -10, -6,
  -5,  14,  -1,  -12, -14, -27, -20, -4,  -2,  21,  20,  4,   -10, -30, -33,
  -2,  14,  10,  13,  10,  8,   -6,  -24, -6,  24,  8,   2,   -10, -6,  4,
  0,   3,   30,  10,  8,   -20, -33, -17, 2,   18,  33,  22,  -14, -33, 1,
  25,  14,  2,   0,   26,  21,  -22, -26, 11,  22,  7,   -1,  14,  20,  8,
  -10, 0,   16,  4,   -12, 19,  0,   -11, -1,  11,  20,  -1,  -30, 20,  8,
  -28, -28, -5,  20,  9,   -28, 4,   12,  -10, -24, -15, -4,  6,   -6,  -6,
  -4,  -8,  -4,  12,  3,   -6,  2,   0,   -10, -22, -14, 22,  38,  11,  -7,
  4,   12,  17,  -4,  2,   22,  -14, -42, 10,  7,   12,  8,   -16, 12,  20,
  -29, 9,   16,  -13, -2,  -5,  -24, 8,   12,  -16, 14,  0,   -31, -4,  -4,
  -18, 6,   -12, -11, 10,  -12, -22, 16,  13,  -4,  6,   4,   -8,  6,   0,
  0,   22,  14,  -20, 18,  11,  -16, 6,   16,  -2,  -3,  -40, -18, 28,  -8,
  -21, 22,  7,   -28, -14, 2,   -24, -36, -3,  16,  0,   -14, -36, -6,  4,
  -24, -17, 14,  17,  -6,  -26, -18, 12,  8,   9,   22,  20,  -2,  -7,  -6,
  11,  8,   16,  38,  14,  -21, 0,   1,   21,  18,  -8,  6,   6,   -32, 2,
  2,   10,  20,  -2,  -28, -14, -14, 0,   9,   3,   -6,  -4,  -8,  -10, 9,
  -7,  4,   16,  -12, -30, -4,  19,  20,  -6,  14,  2,   2,   22,  26,  20,
  10,  -23, -2,  15,  -11, -1,  18,  4,   -3,  10,  -6,  9,   0,   -16, -2,
  -14, -32, 17,  17,  0,   4,   -8,  -6,  -1,  -28, -30, 8,   2,   -10, -2,
  -6,  15,  15,  -41, -24, 4,   -20, -6,  2,   -4,  18,  2,   -20, 8,   0,
  -18, 18,  2,   -21, 25,  16,  22,  29,  -13, 6,   32,  -20, 38,  15,  -13,
  -1,  -6,  -15, -2,  6,   13,  32,  -4,  -13, 2,   -12, -10, 12,  -24, -6,
  -6,  -26, -5,  7,   -2,  9,   -18, -18, -15, -28, -14, 18,  17,  4,   -12,
  4,   14,  -7,  -4,  26,  18,  -9,  -12, -4,  28,  18,  9,   30,  18,  -23,
  12,  -7,  2,   10,  -3,  14,  14,  -30, 19,  19,  2,   -13, -24, -13, -4,
  -24, -17, -12, -2,  -3,  16,  24,  22,  24,  18,  -7,  0,   -8,  -10, 11,
  -2,  -10, 12,  6,   -6,  10,  -3,  -4,  -10, -40, -32, -8,  -16, 5,   20,
  -6,  2,   2,   -22, -19, 6,   -6,  8,   2,   1,   34,  32,  8,   29,  21,
  -16, 4,   -4,  -8,  24,  22,  9,   18,  -7,  -2,  8,   -28, -22, -8,  -25,
  -29, -4,  -2,  12,  7,   -13, -46, -15, 25,  2,   -4,  -8,  -28, -17, -5,
  -6,  16,  14,  -4,  8,   2,   -31, 10,  36,  15,  12,  -10, -13, 22,  -10,
  -8,  26,  14,  -4,  -12, -22, 6,   12,  6,   8,   -6,  -28, -10, 8,   4,
  4,   10,  21,  -2,  -25, -7,  20,  6,   10,  -8,  4,   8,   -12, 10,  18,
  -13, 24,  4,   -20, -13, -14, 12,  21,  -18, -6,  5,   26,  -10, -16, 33,
  18,  -38, 12,  -6,  4,   8,   -22, -5,  24,  -16, 4,   10,  -6,  -12, 1,
  -7,  -1,  -2,  -2,  -6,  14,  -12, -18, 22,  17,  -14, 26,  -7,  -8,  10,
  -8,  4,   24,  -2,  23,  8,   -16, -8,  13,  8,   -8,  -9,  20,  -13, -9,
  12,  -8,  2,   8,   -21, 32,  -14, -34, 30,  16,  -31, 6,   10,  -22, -26,
  -26, -24, -10, -4,  -6,  -4,  8,   2,   14,  8,   5,   12,  6,   8,   29,
  16,  20,  24,  14,  14,  8,   2,   13,  -4,  -20, -12, -12, -4,  -2,  -18,
  -8,  -14, -33, -21, -10, -15, -6,  -6,  -10, -5,  0,   22,  39,  13,  -2,
  16,  2,   2,   20,  28,  24,  18,  1,   10,  5,   -2,  0,   -2,  -30, -34,
  -18, -10, 17,  2,   7,   -1,  -14, -2,  -8,  -28, 33,  2,   -20, 2,   0,
  0,   16,  0,   14,  -6,  -31, -12, 14,  6,   4,   15,  -11, -24, -19, 12,
  25,  4,   -18, -13, -18, -2,  -6,  26,  28,  -16, -14, 1,   -23, 14,  29,
  -2,  6,   -22, -20, 37,  1,   -5,  26,  -5,  -24, 3,   -12, 12,  26,  0,
  -15, -3,  -8,  9,   16,  -9,  -26, 20,  17,  -26, -29, -25, -8,  14,  -16,
  -8,  18,  -4,  -2,  11,  7,   16,  4,   6,   4,   -14, -8,  34,  26,  -4,
  -12, 10,  14,  0,   -18, -4,  6,   -24, -13, 0,   9,   0,   -1,  -12, -10,
  -14, 12,  13,  16,  -27, -19, 24,  17,  14,  16,  13,  10,  -17, -14, 24,
  14,  8,   -5,  -9,  -28, -10, 22,  16,  -18, -28, -36, 0,   35,  34,  10,
  -14, -16, -2,  -15, 4,   14,  -7,  -12, -14, -11, 10,  18,  21,  18,  -25,
  -36, -12, 6,   18,  16,  -2,  -6,  -2,  -11, 12,  19,  2,   -5,  -20, -27,
  -2,  14,  24,  17,  -18, -9,  -5,  12,  12,  -4,  -12, -11, -10, 4,   8,
  29,  18,  -8,  -18, -18, 8,   7,   2,   -9,  -22, -11, 18,  16,  11,  8,
  23,  -18, -4,  30,  -25, -39, 14,  -4,  -5,  8,   -14, 10,  8,   -20, 22,
  22,  -16, -12, 9,   -4,  -6,  2,   26,  0,   10,  -2,  -2,  10,  0,   -15,
  -3,  4,   -10, 10,  6,   -4,  4,   7,   -9,  44,  -8,  -16, 10,  2,   -14,
  4,   16,  28,  -6,  -8,  10,  -12, 2,   -4,  -12, 0,   -31, -15, 34,  -13,
  -15, 36,  -15, -12, 10,  -14, -6,  26,  8,   -16, -12, -3,  1,   -1,  -4,
  14,  0,   -10, 8,   8,   -7,  0,   15,  11,  -23, -24, 24,  -18, -6,  5,
  10,  -15, -5,  6,   -2,  -37, 10,  14,  -8,  -14, 6,   32,  -6,  -15, 28,
  16,  -33, 18,  16,  -22, -5,  4,   18,  4,   -27, 16,  16,  -34, -4,  -2,
  4,   -18, -4,  20,  -14, -13, 33,  7,   -16, 11,  19,  -4,  -14, -8,  14,
  10,  -10, -6,  9,   -14, -2,  13,  1,   -32, 7,   9,   6,   -20, -8,  28,
  -12, -42, 19,  14,  -11, 4,   3,   4,   -17, -7,  30,  10,  -44, 16,  24,
  -20, 2,   10,  10,  -4,  -18, 24,  4,   -31, 26,  6,   -9,  -14, 12,  14,
  -8,  -24, 12,  2,   4,   -2,  4,   -14, -10, 19,  -4,  15,  -10, -4,  13,
  -20, -8,  12,  -51, -6,  10,  0,   6,   16,  -8,  16,  22,  8,   -17, 12,
  -8,  -6,  10,  -8,  13,  16,  2,   -19, 18,  -16, -8,  11,  -32, -18, 14,
  2,   -5,  18,  -4,  8,   7,   16,  -22, 4,   0,   -4,  8,   -9,  10,  20,
  6,   -24, 16,  -9,  -16, 2,   -13, -60, 10,  11,  -3,  13,  -5,  11,  6,
  16,  -23, -10, -4,  -18, -16, 8,   18,  31,  -18, 4,   30,  2,   4,   10,
  -8,  23,  -28, 2,   34,  -21, -11, 30,  -18, -1,  -17, -4,  15,  -31, -28,
  27,  -5,  -6,  -4,  10,  16,  -10, 14,  30,  -22, -6,  9,   2,   7,   0,
  -6,  22,  -14, -10, 2,   0,   -12, -12, -20, -16, 2,   11,  -6,  2,   8,
  0,   14,  18,  -5,  50,  33,  12,  10,  -4,  -3,  6,   0,   -11, -37, -40,
  -8,  -8,  -10, 6,   -6,  0,   -18, -5,  10,  4,   -4,  12,  0,   13,  17,
  32,  32,  2,   -2,  5,   -2,  -10, -15, -20, -14, -17, -7,  4,   -4,  -10,
  -8,  -9,  -8,  -5,  0,   6,   -2,  6,   23,  30,  32,  22,  11,  6,   -5,
  -6,  -2,  -16, -22, -14, -10, -4,  0,   -2,  16,  -3,  -34, 12,  -2,  -44,
  12,  15,  -22, 0,   22,  4,   16,  10,  17,  -18, 9,   -4,  4,   0,   -8,
  5,   4,   -6,  5,   17,  -14, -14, 2,   -18, -26, 26,  -2,  -21, 9,   13,
  2,   15,  16,  -12, -8,  0,   8,   -4,  6,   0,   11,  -30, -6,  4,   14,
  -18, -18, 3,   -42, -9,  34,  4,   -24, 20,  2,   4,   22,  -26, 0,   29,
  11,  20,  4,   -17, 0,   40,  -8,  -3,  -21, -24, -6,  -13, 14,  12,  -5,
  -10, 8,   -11, -2,  4,   10,  -15, -26, -4,  36,  13,  7,   28,  -16, 15,
  17,  5,   -2,  -21, -27, 8,   -14, 2,   2,   5,   -2,  -20, -2,  1,   2,
  -17, -22, -22, 8,   20,  22,  24,  4,   -13, 20,  23,  0,   -10, -14, -8,
  -14, -26, 22,  18,  -42, -20, 24,  12,  -3,  12,  4,   -18, -6,  36,  12,
  -27, -4,  4,   -4,  -8,  -2,  18,  4,   -22, 10,  -10, -12, 24,  18,  -26,
  -16, 2,   16,  1,   17,  -7,  -20, 12,  16,  -7,  -6,  8,   2,   -7,  -5,
  2,   6,   5,   -2,  14,  -21, -2,  28,  1,   -27, -12, 12,  4,   -6,  13,
  -10, -28, 26,  15,  -11, 12,  1,   -29, -10, 34,  33,  6,   -8,  5,   -18,
  6,   26,  -2,  -32, -25, -2,  -2,  -6,  6,   18,  -6,  -16, -4,  9,   -12,
  16,  6,   -18, -18, 20,  36,  4,   -2,  2,   -6,  6,   18,  -10, -18, -18,
  6,   -11, 6,   -2,  8,   -4,  -21, 4,   4,   -2,  14,  2,   -32, 4,   28,
  32,  -11, 8,   -8,  -9,  14,  14,  -8,  -32, 16,  -2,  2,   1,   4,   8,
  -16, -25, 10,  -18, -2,  1,   -2,  1,   4,   31,  4,   -14, 10,  5,   -7,
  10,  -13, -8,  -2,  8,   0,   0,   0,   -4,  8,   -17, 18,  -23, 18,  -16,
  3,   5,   -9,  23,  28,  -25, 13,  11,  -22, 32,  -18, -12, -8,  -18, 19,
  -14, -2,  16,  -24, 10,  32,  -29, 22,  0,   -18, 28,  -32, 24,  -9,  24,
  -24, 8,   4,   -18, 23,  -41, -9,  -8,  20,  -8,  14,  -4,  0,   28,  16,
  1,   -13, 5,   -18, 12,  -10, -7,  -36, 18,  2,   -2,  9,   -6,  12,  -8,
  -8,  3,   -2,  -8,  14,  -4,  -5,  14,  -2,  32,  -27, 12,  -4,  -12, 12,
  -16, -42, 12,  2,   0,   22,  -27, 24,  -4,  30,  6,   -10, -4,  -2,  -2,
  8,   -8,  8,   -18, 10,  -12, 14,  19,  -40, 11,  3,   6,   2,   20,  -14,
  -10, 8,   12,  -9,  -4,  1,   -8,  -2,  -5,  2,   0,   14,  -8,  4,   4,
  -11, 21,  2,   -14, -35, 24,  -2,  -2,  22,  -21, -4,  18,  -20, 22,  -18,
  2,   -4,  -13, 18,  -14, 31,  19,  -11, -2,  21,  -24, 27,  -12, 12,  -42,
  9,   6,   -17, 20,  -18, 6,   10,  -3,  22,  -4,  -3,  16,  -19, 5,   -23,
  8,   -24, -16, 2,   -2,  -6,  11,  14,  10,  6,   15,  16,  -11, 7,   0,
  26,  -28, 0,   4,   -17, 1,   10,  -14, 0,   -34, 28,  -18, -16, 27,  -32,
  15,  -2,  15,  10,  14,  8,   12,  -23, 14,  -28, 21,  -18, -16, -4,  -28,
  28,  2,   7,   6,   -7,  6,   12,  -6,  16,  -21, 1,   -14, -28, -4,  11,
  -4,  4,   -6,  8,   2,   48,  21,  -6,  -2,  -2,  6,   -4,  2,   -38, -22,
  -4,  1,   0,   -8,  18,  -22, 22,  9,   4,   4,   3,   6,   20,  -23, 26,
  14,  -10, 12,  -18, -2,  -20, -8,  -2,  -40, -20, 26,  -15, 16,  9,   13,
  8,   23,  32,  -17, -6,  1,   -9,  0,   -4,  -6,  -16, -2,  12,  -4,  1,
  -24, 22,  -25, -14, 42,  -17, -5,  12,  13,  -4,  18,  22,  -4,  -30, 22,
  -17, -16, 11,  -16, -26, 12,  0,   -1,  -1,  22,  -16, 6,   20,  -16, 10,
  -1,  6,   0,   9,   2,   0,   16,  -12, 0,   -10, -16, -13, -2,  -10, -26,
  22,  -2,  -14, 31,  12,  -2,  10,  29,  -18, 0,   3,   5,   -21, 4,   9,
  -31, 16,  -3,  28,  -22, 16,  0,   -18, 0,   -10, 3,   -12, -10, 18,  -18,
  -9,  46,  -16, 10,  -33, 37,  -26, 7,   20,  -12, -20, 8,   -6,  27,  -26,
  6,   11,  -34, 33,  -6,  4,   0,   -3,  8,   2,   -15, 31,  -16, -4,  -4,
  -5,  0,   4,   8,   -22, -5,  5,   6,   4,   2,   -2,  -16, 15,  10,  4,
  -7,  -3,  0,   -3,  8,   0,   -8,  -3,  36,  -12, -18, 10,  -2,  2,   -2,
  -2,  -34, -22, 29,  14,  -18, 14,  -3,  -16, 44,  18,  -14, -5,  -6,  -1,
  -4,  5,   0,   -26, 4,   8,   -10, 11,  0,   8,   -14, -16, 7,   10,  -7,
  2,   0,   -7,  8,   38,  6,   -24, 10,  6,   -10, 12,  2,   -32, -20, 30,
  -4,  -16, 16,  -4,  -6,  6,   22,  -14, -14, 22,  -14, 30,  -12, 14,  2,
  2,   8,   -18, -1,  2,   -42, 21,  -4,  -34, 19,  -1,  14,  22,  -10, 26,
  -17, 2,   42,  -40, -2,  -8,  -8,  6,   -6,  -6,  12,  -22, 22,  -8,  0,
  -8,  4,   -8,  2,   -4,  10,  -2,  16,  10,  -10, 20,  3,   12,  -27, -6,
  -6,  -11, 5,   -4,  -11, -14, 24,  -16, 20,  -8,  6,   1,   -3,  17,  -16,
  -28, 18,  6,   10,  8,   -18, 12,  -24, 50,  -14, -6,  -26, -3,  8,   -6,
  22,  -36, -6,  5,   30,  -6,  10,  -5,  -11, 20,  -7,  14,  -23, 5,   -2,
  -6,  4,   12,  10,  -2,  0,   -16, 8,   -6,  8,   -38, -20, -2,  14,  17,
  4,   0,   -6,  30,  32,  4,   -18, -13, -12, 3,   6,   -10, -16, -9,  10,
  8,   4,   6,   -6,  4,   3,   0,   -9,  -24, -18, -8,  -2,  -1,  -7,  -2,
  12,  34,  38,  17,  11,  8,   -2,  3,   0,   -32, -32, -16, -16, 8,   -16,
  12,  -6,  6,   18,  -5,  8,   -2,  0,   0,   7,   -2,  30,  10,  15,  -2,
  6,   4,   -9,  -7,  -40, -37, -20, 12,  -11, -2,  6,   6,   30,  36,  22,
  -9,  1,   4,   -3,  -3,  -8,  -19, -10, 18,  -9,  6,   1,   -14, 0,   31,
  2,   12,  -37, 18,  -8,  8,   24,  -41, -23, 4,   -2,  21,  1,   -22, 7,
  -6,  32,  0,   -6,  6,   -8,  -8,  23,  -11, 4,   0,   -5,  0,   -12, 21,
  0,   -5,  -24, -6,  4,   16,  12,  -19, -4,  -8,  42,  -6,  14,  -16, -17,
  18,  0,   12,  -36, 8,   -12, 7,   5,   -2,  -2,  -12, 18,  20,  -5,  4,
  4,   -5,  20,  4,   -20, -26, -10, 4,   -8,  8,   -11, -34, 32,  8,   32,
  -19, 23,  -16, 0,   30,  -16, 0,   -16, 12,  -18, 18,  -11, 6,   -4,  -2,
  -3,  -14, 16,  -18, 8,   -18, 2,   -10, 28,  10,  -6,  14,  -10, 26,  6,
  28,  -34, -8,  4,   -10, 6,   -15, -18, -14, 3,   12,  -2,  -2,  10,  -12,
  21,  -8,  18,  -9,  -8,  1,   7,   5,   0,   16,  -20, -2,  22,  3,   -14,
  -10, -1,  -23, 17,  12,  -17, -26, 26,  8,   0,   27,  -6,  -26, 18,  26,
  -8,  -20, 8,   -32, 0,   22,  -2,  -36, 4,   21,  -8,  24,  10,  -14, -12,
  34,  4,   -20, 7,   -18, 1,   -6,  24,  -24, -10, 18,  -6,  16,  -10, 10,
  -13, 2,   12,  -12, 4,   0,   6,   8,   6,   2,   0,   4,   1,   -2,  -13,
  -20, -18, -4,  -4,  -8,  -4,  6,   15,  30,  31,  12,  8,   10,  10,  -4,
  -18, -35, -41, -19, -6,  -12, -12, 2,   10,  38,  43,  24,  6,   5,   12,
  0,   -6,  -26, -41, -23, -4,  -1,  -8,  -4,  2,   12,  30,  18,  3,   -2,
  4,   3,   -1,  0,   -12, -8,  -2,  1,   -2,  -9,  -11, 8,   2,   -12, 4,
  3,   0,   20,  18,  -2,  -14, 14,  8,   -10, -2,  -28, -28, -6,  22,  -16,
  -14, 8,   6,   31,  37,  9,   -20, 6,   27,  -10, -6,  -31, -34, -17, 22,
  0,   -27, 2,   10,  22,  30,  16,  -14, -10, 27,  2,   -12, -16, -16, -11,
  10,  12,  -12, -10, 13,  0,   14,  -2,  2,   -8,  -1,  10,  -8,  -4,  2,
  -10, 8,   11,  3,   4,   -7,  14,  -3,  16,  -2,  -30, -9,  -12, 11,  -26,
  6,   -22, 2,   34,  23,  14,  -7,  29,  0,   18,  4,   -34, -32, -12, 2,
  -30, 1,   -20, 0,   26,  40,  8,   2,   27,  1,   15,  5,   -18, -36, -9,
  -2,  -16, -4,  -9,  -6,  10,  26,  6,   2,   4,   4,   0,   6,   -2,  -11,
  -5,  0,   8,   -2,  -8,  2,   -11, 8,   12,  6,   -8,  -8,  10,  8,   5,
  4,   -30, -14, 2,   22,  -18, -3,  -12, -6,  28,  27,  2,   -31, 11,  9,
  6,   13,  -24, -32, -10, 34,  -4,  -8,  -8,  -8,  12,  35,  8,   -20, -16,
  26,  -12, 20,  -9,  -30, -8,  8,   16,  -16, -3,  2,   -12, 24,  -8,  18,
  -28, 22,  -10, 6,   2,   -6,  2,   -4,  3,   4,   -10, 25,  -16, -2,  -14,
  18,  -14, 4,   0,   -20, -6,  20,  19,  -14, 2,   10,  -10, 24,  18,  -28,
  -20, 4,   11,  -14, 7,   -14, -36, 30,  8,   12,  -20, 12,  0,   -2,  43,
  -24, -9,  -3,  2,   12,  -24, 28,  -45, 14,  6,   6,   -3,  -10, 17,  -16,
  18,  3,   0,   -3,  0,   5,   -3,  -2,  3,   -8,  -1,  -4,  0,   -4,  8,
  -2,  14,  8,   2,   8,   7,   2,   -5,  -10, -18, -23, 11,  -24, 4,   -14,
  8,   14,  17,  36,  -20, 26,  6,   0,   10,  -26, -11, -40, 26,  -22, -11,
  4,   -11, 20,  12,  32,  -32, 19,  14,  -6,  6,   -7,  -17, -20, 16,  8,
  -28, 15,  -10, 4,   10,  14,  5,   -22, 24,  -13, 8,   0,   -4,  -6,  4,
  -8,  10,  -6,  0,   3,   4,   -6,  -3,  -2,  10,  -14, 14,  -10, -9,  10,
  4,   6,   -9,  2,   1,   -10, 26,  -12, -7,  0,   -2,  8,   -7,  14,  -26,
  4,   18,  -8,  8,   -19, 16,  -23, 23,  5,   16,  -44, 48,  -42, 42,  -27,
  18,  -19, -8,  8,   5,   -14, 18,  -22, 14,  1,   8,   -8,  8,   -5,  4,
  -2,  4,   -5,  0,   -2,  6,   -8,  9,   -4,  4,   -5,  -2,  6,   -4,  0,
  2,   -8,  2,   6,   -4,  7,   -12, 11,  -6,  8,   4,   -9,  2,   4,   -3,
  6,   -10, 4,   -14, 12,  20,  -34, 32,  -36, 34,  -20, 24,  -10, -24, 23,
  -10, 6,   0,   -9,  0,   -6,  -3,  16,  -28, 26,  -27, 24,  -10, 6,   -16,
  22,  -26, 30,  -27, 24,  -20, 8,   1,   3,   -6,  7,   -5,  -2,  0,   -6,
  -11, 4,   -1,  2,   -5,  17,  -6,  14,  10,  4,   -4,  -2,  8,   -22, 4,
  -14, -4,  -16, 16,  -10, 4,   11,  6,   9,   -8,  24,  -20, 11,  -2,  -12,
  -6,  -5,  4,   -18, 14,  -5,  -6,  14,  5,   0,   -30, 53,  -50, 40,  -29,
  22,  -24, 10,  26,  -26, 16,  -9,  4,   -2,  4,   -1,  -8,  14,  -20, 24,
  -22, 14,  -3,  -7,  12,  -12, 8,   -4,  -4,  14,  -23, 21,  -4,  -3,  12,
  -19, 28,  -32, 31,  -21, -16, 28,  -39, 42,  -38, 34,  -25, 11,  10,  -4,
  2,   8,   -12, 10,  -10, 5,   -15, 14,  -14, 8,   -6,  6,   0,   1,   11,
  -6,  2,   1,   -4,  3,   -2,  1,   -2,  -2,  2,   -2,  3,   0,   0,   0,
  -12, 18,  -28, 38,  -39, 34,  -30, 22,  1,   2,   5,   -10, 8,   -12, 21,
  -19, -2,  8,   -22, 30,  -25, 26,  -26, 16,  -12, 12,  -9,  11,  -14, 5,
  5,   -7,  10,  2,   -12, 14,  -12, 16,  -14, 6,   0,   -14, 19,  -14, 9,
  -10, 4,   2,   -5,  16,  -14, 6,   0,   -2,  5,   -8,  -2,  4,   -12, 18,
  -20, 16,  -13, 8,   10,  -22, 32,  -36, 37,  -28, 18,  -10, -2,  2,   3,
  -10, 12,  -12, 8,   0,   0,   -2,  4,   -2,  4,   -6,  2,   -4,  -16, 18,
  -20, 14,  -11, 7,   -4,  3,   -4,  18,  -26, 34,  -32, 27,  -16, 4,   6,
  -12, 10,  -6,  0,   3,   -8,  9,   -12, 13,  -8,  4,   4,   -6,  9,   -8,
  -2,  12,  -22, 29,  -31, 26,  -21, 10,  14,  -18, 18,  -16, 16,  -9,  2,
  2,   -7,  -4,  13,  -18, 20,  -24, 20,  -10, -11, 26,  -33, 33,  -28, 22,
  -12, 2,   -2,  5,   -13, 26,  -31, 26,  -21, 10,  0,   4,   0,   -2,  0,
  3,   -1,  2,   -7,  7,   -12, 16,  -14, 8,   -4,  -4,  8,   -2,  2,   2,
  -9,  14,  -14, 12,  10,  -21, 25,  -28, 29,  -26, 18,  -10, -7,  6,   -2,
  -3,  11,  -16, 16,  -11, -18, 34,  -46, 52,  -51, 43,  -28, 9,   0,   7,
  -18, 24,  -26, 19,  -14, 8,   -6,  7,   -10, 14,  -16, 16,  -7,  0,   6,
  -4,  0,   4,   -4,  4,   -6,  3,   2,   -6,  10,  -9,  6,   -3,  4,   0,
  3,   -3,  4,   -6,  8,   -5,  2,   -3,  2,   -2,  2,   -2,  0,   -2,  2,
  0
};

static const int32_t mdt8x8_mode5[4096] = {
  7,   9,   9,   10,  9,   5,   3,   4,   8,   14,  13,  14,  16,  12,  7,
  5,   7,   16,  18,  17,  18,  17,  12,  8,   5,   14,  18,  19,  20,  20,
  16,  12,  5,   12,  17,  21,  22,  21,  20,  16,  6,   10,  16,  20,  22,
  22,  23,  21,  6,   10,  15,  20,  22,  26,  25,  22,  5,   10,  13,  19,
  22,  24,  24,  21,  10,  4,   -5,  -8,  -6,  -4,  -3,  2,   16,  14,  -5,
  -14, -12, -9,  -6,  -2,  18,  25,  4,   -15, -16, -13, -9,  -4,  14,  30,
  20,  -6,  -18, -16, -12, -6,  11,  28,  30,  7,   -14, -18, -14, -12, 10,
  24,  34,  20,  -4,  -14, -16, -16, 10,  20,  30,  28,  8,   -10, -18, -18,
  6,   16,  24,  29,  16,  -4,  -16, -18, 5,   -2,  -4,  3,   6,   5,   6,
  7,   8,   -6,  -12, -2,  9,   10,  8,   9,   11,  -4,  -24, -14, 7,   15,
  12,  10,  10,  9,   -21, -29, -5,  16,  20,  13,  10,  20,  -6,  -36, -22,
  10,  24,  16,  8,   22,  12,  -26, -34, -4,  20,  20,  7,   20,  19,  -6,
  -34, -20, 11,  22,  8,   17,  22,  10,  -18, -24, -3,  21,  -3,  -8,  2,
  7,   -6,  -12, -7,  -6,  4,   -12, -4,  15,  3,   -18, -20, -10, 14,  -6,
  -14, 15,  20,  -12, -30, -18, 17,  6,   -18, 2,   29,  8,   -30, -29, 14,
  18,  -12, -12, 24,  24,  -16, -33, 12,  22,  -2,  -20, 4,   26,  4,   -27,
  12,  22,  8,   -18, -11, 19,  18,  -15, 8,   18,  14,  -8,  -12, 10,  20,
  -4,  -2,  -4,  0,   -6,  -2,  16,  20,  12,  -6,  -14, -4,  -8,  -17, 4,
  30,  30,  -4,  -20, -10, -1,  -24, -20, 24,  40,  8,   -15, -18, 3,   -12,
  -32, 0,   32,  18,  0,   -20, 4,   8,   -20, -16, 12,  18,  18,  -11, -3,
  20,  8,   -13, -6,  12,  26,  3,   -12, 12,  26,  2,   -12, 4,   22,  16,
  -10, 0,   26,  18,  -3,  4,   10,  14,  11,  10,  10,  2,   -6,  6,   13,
  22,  20,  17,  20,  8,   -8,  4,   6,   22,  28,  19,  22,  14,  -4,  6,
  -2,  6,   24,  19,  14,  12,  8,   15,  0,   -12, 8,   12,  -2,  1,   16,
  20,  12,  -16, -10, 2,   -15, -20, 2,   18,  20,  -7,  -16, -6,  -18, -38,
  -25, 12,  20,  4,   -12, -15, -18, -36, -42, -20, -12, -2,  -4,  4,   0,
  -10, -9,  -24, -24, -3,  -4,  5,   8,   -14, -24, -17, -30, -8,  -6,  -4,
  18,  -6,  -34, 0,   -24, -12, -6,  -16, 12,  6,   -26, 17,  -12, -14, 6,
  -13, -8,  8,   -8,  26,  3,   -14, 20,  10,  -20, 0,   14,  24,  22,  -6,
  19,  30,  -10, -7,  22,  16,  31,  9,   10,  32,  9,   -6,  16,  16,  10,
  -14, -16, 1,   -4,  -8,  -4,  22,  30,  -9,  -28, -6,  0,   -10, -11, 14,
  32,  14,  -24, -20, 2,   -5,  -16, -4,  10,  24,  2,   -22, -4,  8,   -12,
  -2,  -8,  4,   18,  -6,  -8,  16,  -1,  14,  -1,  -21, -6,  6,   0,   14,
  10,  20,  15,  -25, -38, -8,  11,  10,  14,  16,  27,  -6,  -43, -26, 14,
  14,  12,  -2,  -26, -14, 12,  12,  2,   0,   -5,  15,  -23, -35, 4,   25,
  12,  0,   -4,  30,  4,   -38, -18, 16,  20,  5,   3,   18,  26,  -10, -24,
  -3,  15,  10,  10,  -4,  20,  14,  -2,  -6,  0,   4,   12,  -8,  -4,  3,
  11,  13,  -2,  -10, 0,   3,   -13, -22, -4,  22,  15,  -14, -19, 10,  -6,
  -34, -22, 15,  30,  -2,  -30, -2,  -4,  11,  -4,  -17, 0,   14,  8,   14,
  -6,  8,   10,  -20, -20, 13,  20,  28,  5,   -2,  16,  1,   -27, -9,  22,
  20,  14,  -2,  4,   14,  -6,  -20, 8,   8,   4,   3,   0,   2,   14,  -2,
  -6,  13,  -11, -11, 8,   -5,  0,   10,  4,   26,  -8,  -38, 8,   11,  -28,
  -4,  25,  30,  12,  -40, -4,  24,  -28, -23, 30,  -8,  -14, -2,  -14, -29,
  -11, -14, -24, 2,   -16, 4,   -2,  -30, -15, -14, -34, 22,  -5,  2,   19,
  -14, -15, 4,   -23, 30,  14,  -9,  20,  4,   -16, 16,  8,   12,  28,  -12,
  2,   16,  -15, 8,   38,  -12, 17,  -4,  -13, 12,  -7,  -6,  41,  -20, -4,
  8,   -10, 2,   2,   -10, 20,  -15, -24, 2,   0,   -4,  4,   -3,  1,   0,
  20,  12,  2,   26,  9,   2,   20,  -9,  11,  17,  -6,  19,  16,  -3,  21,
  13,  -10, 10,  -7,  -7,  20,  -6,  2,   44,  0,   -4,  5,   -17, 4,   1,
  -18, 39,  25,  -12, 13,  -6,  -16, 4,   -32, -1,  30,  -6,  2,   10,  -12,
  -2,  -21, -28, -3,  -8,  -10, 6,   -6,  1,   11,  -20, -38, -16, -10, -2,
  -3,  0,   25,  6,   -14, -14, 10,  -6,  -18, 8,   29,  10,  -2,  -22, 6,
  4,   -32, -13, 40,  -4,  12,  -4,  -3,  13,  -14, -26, 18,  -10, -2,  6,
  0,   4,   14,  -2,  -8,  5,   -14, -14, 11,  0,   8,   31,  -2,  4,   0,
  -21, 6,   10,  -12, 16,  17,  -26, 14,  6,   -10, 17,  -6,  -24, 14,  -40,
  3,   32,  -8,  6,   14,  -32, -16, 1,   30,  40,  33,  -8,  -14, 2,   16,
  3,   12,  27,  32,  4,   -16, -10, 12,  -2,  -6,  -16, 4,   16,  -6,  -9,
  -8,  -10, -2,  -18, -14, -2,  -13, -4,  -12, -24, 6,   14,  -5,  -13, -34,
  -10, 10,  -17, 2,   24,  8,   -8,  -27, -20, 22,  4,   4,   6,   -8,  2,
  10,  -13, 19,  10,  14,  -2,  -33, -8,  26,  11,  13,  32,  14,  2,   -9,
  3,   -11, -16, 8,   38,  22,  11,  0,   4,   -4,  -20, 2,   32,  6,   4,
  11,  2,   4,   -4,  1,   12,  -10, -19, -1,  -4,  0,   13,  7,   -2,  -21,
  -40, -24, -10, -12, 2,   0,   1,   -22, -29, -22, -8,  -12, -14, -10, 8,
  -18, -4,  12,  2,   4,   1,   -10, 14,  -8,  15,  42,  29,  28,  18,  0,
  20,  -10, -5,  20,  -8,  -6,  -9,  -40, 22,  1,   -10, 29,  13,  -4,  4,
  -28, -10, 16,  -2,  6,   20,  -4,  14,  10,  -11, 2,   8,   -13, -1,  -8,
  -7,  24,  24,  -10, 5,   -2,  -18, -10, -26, 2,   38,  2,   -13, 14,  -11,
  -12, -12, -17, -4,  12,  -7,  2,   6,   -8,  12,  4,   -52, -10, 1,   -16,
  5,   -6,  12,  34,  8,   -16, -3,  21,  16,  18,  10,  4,   30,  -11, -16,
  8,   9,   25,  16,  -1,  24,  10,  -15, -5,  -10, 6,   10,  -15, -6,  10,
  -10, 2,   -2,  -14, -10, -24, -24, -8,  -14, 10,  30,  -10, -23, -14, -17,
  -18, -12, 6,   39,  4,   -20, 8,   -4,  -6,  10,  4,   4,   -8,  -14, 23,
  0,   8,   29,  14,  -28, -32, -4,  28,  21,  26,  6,   6,   -8,  26,  18,
  -8,  14,  29,  2,   -6,  -20, 12,  24,  -14, -16, 14,  -9,  -12, -10, -8,
  12,  -22, -18, -6,  -20, -20, 4,   -2,  -1,  -26, 0,   5,   -10, -34, 8,
  18,  2,   -7,  8,   18,  6,   -20, 6,   28,  8,   8,   -4,  7,   4,   -4,
  22,  20,  -18, 6,   -16, -13, -20, -8,  37,  6,   -35, -3,  -14, -15, 8,
  -20, -18, 22,  12,  -14, 10,  -15, 14,  6,   -21, 14,  22,  -6,  30,  2,
  6,   28,  -2,  8,   22,  -2,  6,   6,   -1,  11,  -1,  10,  13,  -14, -28,
  -8,  1,   0,   -21, 2,   14,  -31, -34, -8,  1,   6,   -22, -18, 16,  -29,
  -22, 20,  7,   -5,  4,   -10, 10,  -8,  -20, 26,  14,  -25, 18,  20,  -1,
  3,   34,  -7,  -24, -8,  12,  12,  8,   -7,  38,  -5,  -15, -8,  10,  14,
  4,   2,   7,   -22, -7,  14,  0,   -2,  -17, -2,  -14, -35, -20, 32,  11,
  -10, -24, -8,  -6,  -8,  -5,  28,  5,   -15, 0,   4,   6,   22,  28,  17,
  -18, -22, 22,  16,  7,   6,   19,  6,   -20, -11, 20,  6,   8,   -20, -26,
  -10, 6,   9,   -5,  -16, 9,   16,  26,  14,  -1,  -12, -22, 6,   22,  -10,
  8,   12,  -7,  -10, -23, -7,  18,  -24, -20, -2,  -16, -6,  8,   -8,  4,
  -16, -16, -1,  -20, -14, 31,  11,  -2,  -8,  3,   16,  0,   2,   32,  6,
  8,   -10, 8,   26,  13,  31,  30,  -27, 9,   -2,  6,   12,  4,   16,  9,
  -30, -11, 2,   2,   -14, -14, -34, -28, 2,   5,   -33, 2,   18,  -14, 2,
  13,  6,   10,  -28, -1,  30,  -2,  0,   6,   11,  -14, -4,  16,  24,  -5,
  0,   5,   -2,  -31, 13,  28,  12,  -28, -11, 18,  -22, -11, 22,  8,   -8,
  -20, -21, 22,  -22, 21,  17,  -10, -24, 2,   0,   10,  -6,  29,  -11, -2,
  -12, 0,   20,  -2,  0,   18,  -34, -4,  22,  -7,  4,   -2,  0,   4,   -2,
  -8,  14,  12,  -18, -23, -23, -4,  0,   -10, 4,   26,  -2,  -12, -10, -2,
  -5,  8,   -6,  6,   2,   -4,  22,  2,   -16, 14,  13,  -14, -15, -10, 25,
  -19, -4,  2,   8,   -8,  -7,  -10, -3,  -44, 22,  2,   -30, 2,   18,  3,
  -10, -18, 22,  5,   -34, 13,  10,  -4,  10,  30,  12,  0,   6,   38,  -14,
  -33, 22,  28,  6,   -6,  -4,  -40, -15, 37,  -26, 5,   18,  -8,  2,   -6,
  -26, 29,  -15, -12, -9,  -3,  -6,  18,  5,   -2,  2,   8,   -22, -5,  -10,
  -7,  30,  6,   6,   10,  -2,  -8,  12,  -13, 10,  18,  -8,  -21, 14,  2,
  14,  27,  -10, -6,  -16, -12, -2,  7,   4,   19,  -6,  -16, -6,  40,  -10,
  2,   6,   -34, -8,  18,  8,   -41, 2,   34,  8,   -14, 7,   4,   -24, -13,
  16,  3,   -8,  3,   2,   16,  -10, 35,  15,  -22, -30, 16,  -2,  4,   12,
  13,  -20, 0,   -4,  9,   -4,  -13, 0,   -12, -26, 9,   25,  -6,  -6,  0,
  -12, 14,  6,   -10, 1,   -9,  -2,  16,  8,   26,  4,   -4,  -16, -6,  12,
  7,   14,  0,   -42, 25,  25,  -7,  10,  -16, -20, -12, 2,   2,   -34, -10,
  -11, -10, 17,  11,  -1,  0,   -26, -13, 0,   -17, 11,  12,  -10, -17, -2,
  6,   22,  0,   4,   -40, -8,  -6,  10,  23,  24,  19,  15,  -38, 10,  16,
  6,   16,  4,   -2,  2,   17,  30,  11,  -10, 12,  -5,  -33, -22, 18,  16,
  -12, -11, 10,  -14, -20, -4,  -18, -20, -4,  2,   6,   -6,  8,   33,  8,
  -2,  35,  5,   8,   12,  32,  14,  12,  -8,  8,   9,   6,   0,   6,   -13,
  12,  -12, -12, -6,  -12, -10, -30, -25, -12, -2,  16,  -4,  -20, 0,   -11,
  8,   -4,  -8,  14,  12,  -12, 13,  3,   24,  -4,  16,  -12, -12, 6,   6,
  -4,  11,  -32, 28,  -32, -14, -3,  -18, 12,  -16, -17, 13,  -14, 36,  14,
  -13, 34,  -19, 1,   24,  3,   -22, 21,  14,  -8,  -28, 3,   -2,  16,  -2,
  18,  4,   -7,  -8,  5,   -22, 12,  12,  -5,  -14, -20, 24,  -18, 11,  0,
  -16, -20, 4,   -26, 16,  -32, 36,  -9,  -23, -10, 18,  -2,  0,   -4,  13,
  -22, 8,   24,  -7,  16,  10,  18,  -8,  -7,  14,  28,  -19, 14,  7,   -5,
  -10, 26,  -17, -20, 7,   -6,  -18, -30, -16, -16, 10,  -10, -36, 18,  2,
  6,   3,   18,  -2,  10,  -12, 8,   12,  31,  12,  35,  -3,  -6,  24,  -2,
  2,   5,   -13, -4,  -5,  -32, 16,  -10, -8,  -18, -12, -28, -14, -10, 4,
  -20, 12,  5,   8,   6,   0,   6,   18,  -8,  18,  16,  18,  30,  18,  6,
  12,  9,   -5,  -19, -4,  -30, -18, 4,   -26, 12,  -11, -16, 4,   -11, -18,
  11,  28,  38,  14,  0,   -7,  -2,  -6,  15,  4,   6,   -13, 11,  -8,  14,
  7,   18,  -12, -38, -26, 12,  2,   12,  4,   4,   -4,  -19, 16,  4,   -10,
  2,   -2,  -23, -2,  10,  34,  8,   -20, 9,   -6,  -12, 11,  -6,  -13, 12,
  -14, 20,  -8,  8,   25,  -26, -20, 0,   -12, 19,  -14, -2,  6,   -16, 46,
  14,  -12, 8,   -37, 10,  13,  -26, -6,  8,   -10, 14,  6,   10,  3,   -6,
  4,   13,  -7,  -1,  21,  1,   -14, 0,   16,  8,   -13, 3,   -8,  -13, 4,
  7,   -4,  18,  -36, 26,  -13, -21, 20,  0,   -22, 17,  -17, 39,  -10, 12,
  18,  -26, 15,  -11, 6,   10,  -16, 14,  11,  -22, 36,  -2,  2,   -14, 7,
  -26, 2,   4,   -17, 22,  30,  5,   -23, -30, -16, 16,  -12, 18,  -22, 8,
  -8,  -2,  -1,  8,   12,  -6,  -36, -6,  -8,  5,   36,  0,   8,   2,   13,
  8,   2,   -10, 28,  -14, -12, 10,  18,  16,  20,  0,   -13, -28, -2,  7,
  -29, -8,  -8,  -4,  8,   -8,  16,  1,   -22, -1,  -22, -14, 28,  16,  6,
  -16, 17,  16,  6,   17,  -10, -23, -8,  3,   -5,  22,  37,  22,  -11, 8,
  -16, 11,  -16, 2,   -4,  -6,  -16, 8,   -10, 9,   -19, 14,  -19, -40, -11,
  4,   4,   0,   -8,  19,  0,   -14, 24,  6,   10,  4,   2,   -2,  6,   24,
  43,  1,   -4,  11,  -9,  8,   -2,  -6,  -8,  -20, -9,  8,   -18, 28,  -12,
  -30, -25, -16, 6,   6,   -8,  5,   -16, 17,  38,  -2,  10,  -5,  -12, 22,
  -11, -4,  2,   14,  -26, -13, 2,   17,  -4,  16,  2,   -6,  -8,  -17, 26,
  -4,  -4,  -7,  8,   -32, 18,  -20, 40,  -38, -2,  -10, -2,  -2,  18,  0,
  0,   -32, 19,  16,  -20, 26,  -10, 12,  -19, 25,  -8,  18,  -12, 14,  -14,
  2,   -6,  21,  -18, -7,  -2,  -4,  1,   -12, 20,  -28, 18,  2,   2,   -1,
  4,   10,  -40, 34,  -12, -18, -2,  -18, 37,  19,  -14, 22,  0,   -18, 18,
  -6,  -6,  -12, 14,  16,  -14, -4,  26,  -3,  -12, -15, 6,   3,   -27, 8,
  10,  -24, 26,  17,  -10, -13, -4,  -2,  0,   -27, 12,  -2,  8,   -2,  14,
  3,   2,   15,  -8,  -22, 4,   6,   -3,  7,   -3,  17,  5,   32,  -18, 8,
  -12, -12, 16,  -26, 0,   2,   -8,  22,  24,  -10, 38,  -28, -40, 18,  -15,
  4,   -14, -29, 18,  -24, 32,  -10, 8,   2,   -18, -2,  10,  -22, 28,  2,
  -6,  4,   13,  6,   14,  -16, -18, 8,   2,   -2,  0,   -10, 2,   13,  13,
  -11, 2,   -14, 1,   -19, 2,   -2,  16,  -1,  0,   8,   10,  13,  16,  -29,
  -24, 3,   1,   -2,  -5,  0,   -20, 31,  12,  -22, -34, -18, -3,  3,   -10,
  -10, -12, 12,  32,  24,  10,  6,   1,   10,  9,   10,  2,   5,   8,   -8,
  4,   7,   0,   -14, -32, -23, -8,  -14, 2,   -17, -7,  7,   22,  14,  4,
  -2,  4,   -4,  6,   12,  19,  16,  10,  2,   8,   19,  8,   -22, -44, -36,
  -7,  -18, 6,   -26, -18, -5,  29,  16,  16,  -3,  14,  -4,  18,  18,  -9,
  4,   36,  13,  -35, 4,   13,  -4,  -4,  6,   -30, -20, 8,   18,  -22, 2,
  -10, 1,   -12, -3,  22,  -3,  -2,  8,   0,   -8,  40,  20,  -10, -20, 19,
  -4,  8,   7,   -9,  -27, -2,  4,   -12, 4,   -9,  13,  -30, -10, 8,   16,
  -7,  8,   -11, -12, 14,  39,  -6,  -12, 16,  -24, 17,  0,   6,   -28, 10,
  4,   -10, 30,  -6,  -28, 2,   30,  -2,  -11, 1,   -16, -16, 30,  16,  -16,
  -18, 15,  6,   -4,  7,   19,  -10, -16, -6,  10,  -10, 13,  14,  -30, -24,
  17,  14,  -6,  -10, -14, -8,  2,   22,  -6,  -1,  4,   9,   -2,  -4,  18,
  10,  -10, -6,  3,   4,   22,  4,   -10, -48, 26,  -3,  4,   -13, 0,   -23,
  26,  3,   17,  -24, 18,  -5,  38,  -8,  -16, 6,   -22, -4,  13,  -10, -24,
  -10, 16,  11,  -6,  27,  -15, 6,   -6,  0,   10,  0,   -8,  18,  -26, 8,
  36,  -4,  0,   -18, -8,  -9,  -2,  5,   -20, -18, 16,  -12, 21,  2,   8,
  2,   -18, 7,   2,   8,   9,   9,   -4,  -2,  26,  28,  -31, 22,  -38, 3,
  -14, 2,   -22, -7,  1,   10,  -10, 26,  -19, 13,  14,  -44, 6,   8,   2,
  20,  34,  -6,  -4,  15,  24,  -19, 8,   -7,  -24, -4,  -4,  13,  -4,  -12,
  2,   -12, -22, 6,   2,   -20, -11, 14,  2,   5,   38,  4,   4,   8,   14,
  -8,  5,   -6,  -2,  -7,  -2,  4,   4,   -7,  -4,  -2,  -35, -2,  2,   -21,
  -12, 12,  8,   12,  43,  14,  3,   6,   26,  -26, 14,  -23, -12, -14, 8,
  -4,  8,   -4,  -36, -17, -8,  10,  -14, 11,  -4,  0,   13,  36,  1,   12,
  -14, 17,  -26, 14,  10,  7,   -2,  -5,  10,  0,   -12, 24,  -34, -27, -8,
  -8,  6,   -2,  10,  3,   -9,  29,  0,   10,  4,   -8,  4,   -6,  13,  17,
  0,   4,   15,  -17, 16,  -20, 6,   -49, 0,   -12, 4,   -16, 24,  -26, 27,
  -2,  22,  -4,  0,   0,   -4,  -8,  -6,  -20, 6,   -5,  16,  -18, 22,  -12,
  12,  17,  7,   -4,  6,   -20, 31,  -34, 35,  -8,  -2,  2,   -16, 6,   1,
  -20, 24,  -50, 16,  -4,  -1,  16,  -17, 10,  -2,  2,   26,  -16, 6,   1,
  -8,  26,  -17, 36,  -16, 0,   -14, 2,   -4,  1,   -14, -8,  -22, 17,  6,
  0,   6,   -8,  14,  -3,  20,  -14, -4,  0,   10,  -13, 30,  -42, 10,  -34,
  12,  -21, 26,  -24, 17,  -10, 22,  20,  -9,  9,   -16, 2,   -2,  -2,  7,
  -1,  -8,  21,  -4,  11,  4,   -10, 4,   -29, 14,  -25, 20,  -16, 9,   -6,
  6,   12,  3,   -4,  0,   -18, 6,   -4,  3,   10,  -20, 24,  -14, 26,  3,
  -4,  11,  -30, 20,  -20, 10,  -10, -7,  11,  -16, 19,  14,  -2,  6,   -4,
  2,   12,  1,   9,   -6,  -14, 8,   -13, 14,  -18, -11, -3,  -15, 18,  -6,
  -4,  14,  -22, 23,  -6,  -2,  24,  -30, 32,  -23, 14,  13,  -4,  -10, 6,
  -24, 38,  -38, 32,  -33, -2,  -12, 16,  -12, 12,  -20, 22,  -8,  12,  8,
  6,   -11, 15,  -14, 9,   -13, -1,  -4,  -2,  -7,  10,  -16, 19,  -15, 12,
  -44, 41,  -42, 20,  -1,  4,   24,  -6,  26,  -14, 1,   30,  -34, 18,  -29,
  -5,  -4,  11,  6,   -2,  -12, 18,  -18, 11,  -14, 8,   -26, 6,   -6,  -4,
  14,  10,  18,  -14, 7,   13,  -13, 13,  -8,  -8,  3,   -2,  14,  -10, 0,
  10,  -10, 1,   -14, 4,   -16, 0,   8,   -14, 13,  6,   18,  -10, 10,  3,
  -8,  12,  -6,  -6,  0,   2,   -13, 19,  -32, 24,  -9,  4,   8,   -11, 15,
  -14, 13,  2,   -12, 10,  7,   -19, 29,  -38, 35,  -26, 17,  -1,  6,   -6,
  7,   -4,  2,   -8,  14,  -16, 0,   -4,  0,   -3,  6,   6,   -14, 8,   2,
  -8,  24,  -27, 28,  -24, 15,  6,   4,   -4,  1,   -12, 17,  -26, 25,  -28,
  -12, 14,  -15, 16,  -14, 17,  -13, 13,  -2,  -16, -25, -18, -7,  9,   -24,
  -4,  -1,  26,  30,  48,  6,   -2,  22,  16,  0,   -14, -25, -34, -16, 1,
  -8,  -14, -3,  2,   4,   4,   4,   -2,  -8,  2,   0,   16,  6,   32,  4,
  6,   15,  11,  -4,  -13, -25, -36, -18, 8,   -19, -14, 2,   11,  22,  28,
  14,  -6,  10,  10,  -2,  0,   -14, -4,  -12, 12,  -9,  -1,  30,  17,  -12,
  5,   12,  5,   -10, -6,  -48, -24, 10,  9,   -32, 0,   10,  4,   36,  18,
  -14, -5,  20,  8,   -13, 1,   -12, -2,  13,  2,   4,   0,   2,   0,   -19,
  -12, -6,  3,   -22, -8,  0,   0,   37,  27,  -11, -4,  26,  6,   -6,  6,
  -32, -30, 20,  8,   -17, -6,  11,  -8,  12,  15,  -7,  -9,  6,   4,   -9,
  6,   4,   14,  22,  -24, -8,  18,  4,   -16, 2,   -27, -28, 23,  22,  -33,
  -2,  20,  -1,  18,  18,  -16, -12, 20,  10,  -18, 6,   -8,  7,   2,   4,
  -2,  -3,  0,   0,   -18, -16, 2,   14,  -22, -1,  9,   -4,  27,  30,  -22,
  -12, 26,  8,   -14, 8,   -28, -24, 22,  12,  -24, -7,  15,  -6,  9,   16,
  -15, 0,   6,   9,   -11, 9,   14,  8,   6,   -34, -25, -12, -1,  -21, -6,
  -26, 5,   27,  44,  15,  6,   20,  2,   14,  2,   -32, -26, -12, 2,   -10,
  8,   -4,  2,   5,   7,   3,   -8,  -8,  -3,  -20, 5,   8,   23,  8,   7,
  16,  10,  18,  6,   -34, -25, -22, -1,  -20, -6,  -20, 2,   25,  30,  15,
  -5,  7,   4,   6,   4,   -14, -8,  -10, 6,   4,   -14, 8,   20,  2,   9,
  -1,  -34, -15, 37,  -24, -16, -12, -9,  -4,  40,  10,  -27, 9,   22,  -2,
  14,  -7,  -18, -6,  15,  0,   -2,  6,   -1,  10,  -12, -6,  10,  -15, -4,
  -20, -10, -10, 28,  10,  -21, 11,  23,  -2,  36,  -12, -20, -10, 18,  -6,
  -18, 4,   -24, 18,  13,  6,   -6,  -2,  14,  -11, 16,  -16, -2,  -18, 5,
  14,  -4,  18,  -13, -32, -2,  27,  -12, -17, -1,  -24, 8,   44,  10,  -25,
  17,  13,  2,   21,  -8,  -22, -12, 11,  -10, -6,  -2,  -1,  -1,  -1,  -1,
  7,   2,   -7,  2,   -22, 9,   24,  11,  -27, 15,  6,   3,   28,  -10, -37,
  -11, 27,  -14, -7,  -3,  -20, 7,   32,  8,   -18, 12,  -4,  8,   2,   2,
  -16, -3,  -7,  14,  -26, 30,  -26, 26,  -30, 5,   4,   -13, 22,  -27, 16,
  -14, 24,  8,   1,   -2,  0,   0,   12,  -7,  -2,  -22, -4,  15,  -16, 22,
  -28, 19,  -16, 18,  -4,  -8,  12,  -17, 16,  -8,  10,  11,  16,  -4,  2,
  4,   6,   -8,  6,   -34, -18, 12,  -16, 9,   -19, 14,  -11, 34,  12,  -9,
  12,  -8,  12,  -10, 10,  -18, -4,  -12, 2,   8,   -8,  14,  -25, 20,  2,
  29,  -14, 4,   -4,  -8,  22,  -30, -2,  -34, 4,   0,   -2,  0,   -12, 26,
  1,   32,  4,   2,   2,   18,  -2,  -2,  -4,  -16, -20, 12,  -10, -22, 9,
  -24, 5,   -2,  28,  -18, 12,  22,  -12, 38,  -3,  8,   -22, 22,  -17, -8,
  4,   -28, 4,   -12, 19,  -22, 14,  -2,  2,   9,   8,   4,   12,  -9,  -6,
  18,  -6,  16,  -11, -12, -21, 12,  11,  -32, 4,   -23, 9,   22,  28,  -18,
  -7,  30,  8,   22,  -6,  -26, -32, 26,  -2,  -16, -22, -15, -4,  32,  22,
  -22, 0,   6,   26,  3,   11,  -30, -8,  15,  2,   2,   -25, 9,   -14, 23,
  -2,  -6,  -4,  -4,  15,  -14, 7,   -6,  -2,  7,   -4,  8,   -10, 10,  2,
  -2,  11,  13,  -4,  -1,  2,   6,   0,   0,   -20, -26, 3,   6,   -10, -5,
  -2,  -1,  34,  34,  0,   -10, 13,  8,   6,   0,   -39, -46, 2,   6,   -12,
  -12, -8,  -6,  42,  45,  -2,  -9,  12,  11,  10,  8,   -30, -39, 0,   8,
  -6,  -10, -8,  -8,  16,  22,  0,   -6,  2,   7,   4,   5,   -5,  -6,  0,
  2,   0,   -2,  10,  4,   -2,  6,   10,  4,   -12, 7,   -16, -12, 2,   -16,
  -22, -6,  20,  -10, 25,  16,  -6,  22,  36,  8,   -20, 8,   -30, -19, 10,
  -22, -44, -3,  12,  -4,  30,  18,  -12, 20,  44,  -4,  -6,  0,   -20, -16,
  13,  -12, -36, 8,   0,   4,   12,  10,  -11, 4,   20,  -7,  0,   -4,  -4,
  -4,  3,   2,   -9,  6,   -2,  3,   4,   8,   -9,  7,   -14, -6,  2,   6,
  -14, -14, 12,  -4,  20,  17,  -6,  -10, 28,  14,  -8,  0,   -28, -29, 8,
  14,  -38, -13, 4,   2,   30,  32,  -8,  -16, 43,  9,   -1,  -4,  -28, -30,
  6,   16,  -36, -8,  0,   2,   23,  22,  0,   -13, 22,  6,   0,   0,   -16,
  -12, -3,  7,   -8,  -2,  1,   -2,  6,   4,   2,   -2,  1,   4,   7,   -3,
  -6,  0,   -17, -7,  -3,  -5,  -16, 6,   12,  2,   33,  17,  5,   6,   25,
  -7,  -14, -6,  -46, -23, -3,  -10, -26, 4,   14,  7,   50,  26,  4,   10,
  30,  -7,  -4,  -10, -40, -28, -3,  -10, -22, 0,   4,   6,   29,  20,  2,
  8,   12,  0,   -2,  -6,  -14, -12, 0,   -4,  -2,  -2,  2,   2,   6,   3,
  -10, 4,   -6,  -2,  0,   -6,  -5,  15,  18,  -8,  10,  2,   4,   8,   18,
  -30, -26, 8,   -10, -3,  -3,  -17, -22, 35,  30,  -4,  5,   8,   -6,  27,
  20,  -32, -26, -4,  4,   -14, 18,  -34, -8,  24,  16,  12,  -12, 21,  -23,
  33,  2,   -14, -10, -11, 10,  -18, 17,  -26, 2,   4,   2,   8,   -9,  12,
  -12, 14,  -3,  0,   -2,  5,   -14, 18,  -20, 18,  -10, 5,   1,   -1,  16,
  -24, 26,  -28, 10,  -2,  6,   -11, -10, 20,  -22, 31,  -6,  -4,  -14, 22,
  1,   -8,  12,  -24, -2,  9,   19,  -33, 13,  -10, 5,   8,   14,  -16, -22,
  36,  -21, 22,  -18, 6,   -20, 18,  16,  -26, 16,  -18, 14,  -8,  14,  -12,
  -8,  12,  -10, 10,  -10, 8,   -8,  6,   6,   -10, 7,   -12, 8,   0,   -2,
  7,   -10, 18,  -12, 18,  -10, -8,  8,   -18, 17,  -28, 16,  -19, 8,   16,
  -15, 31,  -20, 29,  -18, 15,  -6,  -19, 20,  -38, 20,  -26, 14,  -8,  1,
  22,  -23, 38,  -15, 18,  -6,  0,   6,   -22, 20,  -30, 9,   -9,  1,   4,
  -6,  14,  -12, 18,  -3,  2,   2,   -4,  6,   -7,  6,   -6,  4,   -6,  8,
  -10, 12,  -13, 10,  -6,  -8,  12,  -15, 19,  -21, 22,  -14, 12,  13,  -18,
  20,  -24, 26,  -28, 20,  -18, -14, 20,  -22, 25,  -29, 30,  -23, 20,  14,
  -21, 22,  -22, 25,  -26, 20,  -16, -10, 15,  -15, 14,  -15, 16,  -12, 11,
  6,   -8,  8,   -7,  8,   -8,  7,   -7,  -3,  4,   -4,  4,   -4,  4,   -3,
  2
};

static const int32_t mdt8x8_mode6[4096] = {
  6,   10,  14,  14,  16,  14,  12,  10,  10,  16,  20,  23,  26,  27,  23,
  22,  6,   12,  20,  24,  26,  28,  27,  26,  5,   9,   12,  16,  24,  30,
  30,  26,  2,   4,   6,   10,  16,  21,  26,  27,  -1,  -1,  1,   4,   8,
  12,  15,  20,  4,   3,   0,   -2,  2,   8,   10,  12,  0,   2,   2,   3,
  4,   7,   10,  12,  -2,  -2,  -2,  -2,  -4,  -6,  -6,  -5,  0,   -2,  -2,
  -4,  -7,  -8,  -6,  -8,  -5,  -4,  2,   0,   -1,  -3,  -6,  -9,  -2,  2,
  -1,  0,   -2,  0,   2,   0,   10,  12,  7,   0,   -8,  -13, -12, -8,  14,
  20,  20,  18,  14,  8,   4,   0,   4,   14,  28,  38,  44,  42,  30,  17,
  2,   6,   12,  18,  27,  36,  43,  42,  0,   -4,  -6,  -4,  -5,  -6,  -4,
  -2,  -2,  -7,  -12, -12, -13, -14, -12, -10, 16,  14,  2,   -8,  -16, -22,
  -19, -20, 10,  18,  22,  19,  6,   -10, -22, -18, 1,   11,  22,  30,  32,
  30,  22,  12,  -8,  -6,  4,   18,  30,  35,  35,  34,  0,   -6,  -10, -9,
  -4,  8,   22,  28,  4,   2,   -4,  -8,  -11, -13, -12, -4,  0,   -12, -28,
  -34, -34, -28, -24, -16, 13,  20,  18,  4,   -18, -34, -38, -40, 5,   12,
  18,  28,  30,  19,  0,   -16, 2,   -4,  -5,  0,   12,  22,  28,  22,  -4,
  -8,  -2,  -1,  -3,  -1,  8,   20,  6,   7,   3,   0,   -2,  -2,  -2,  -4,
  -9,  -12, -6,  -2,  2,   -2,  -6,  -4,  2,   -2,  -6,  -11, -12, -6,  2,
  0,   -8,  -12, -12, -6,  0,   6,   6,   0,   3,   -3,  -10, -18, -18, -8,
  6,   12,  18,  25,  18,  4,   -9,  -16, -18, -12, -8,  0,   18,  28,  31,
  16,  -4,  -18, -2,  -9,  -17, -11, 8,   26,  26,  10,  10,  6,   -6,  -21,
  -30, -22, -2,  11,  12,  22,  20,  14,  -2,  -20, -27, -18, -3,  6,   22,
  33,  33,  20,  2,   -8,  2,   6,   8,   14,  10,  1,   -4,  -2,  -2,  -4,
  0,   -4,  -4,  5,   16,  12,  18,  18,  6,   -2,  -14, -20, -15, -2,  -10,
  -14, -7,  8,   17,  8,   -13, -19, 1,   0,   -10, -17, -7,  13,  28,  22,
  6,   16,  20,  16,  -7,  -24, -22, -10, -26, -33, -15, 4,   16,  16,  1,
  -20, 0,   -14, -37, -45, -29, -2,  22,  29,  -15, -19, -12, -6,  -9,  -20,
  -31, -22, -6,  -18, -27, -16, 12,  26,  9,   -16, 25,  28,  2,   -20, -15,
  12,  36,  36,  11,  26,  28,  18,  2,   -10, 0,   14,  -10, -5,  16,  26,
  18,  -5,  -16, -12, 4,   -4,  -4,  -2,  -2,  -1,  -14, -27, 0,   -5,  -6,
  -2,  2,   0,   -11, -24, 8,   4,   -2,  -4,  0,   8,   16,  12,  -1,  -1,
  0,   -4,  -4,  4,   12,  14,  -8,  -14, -10, 2,   1,   -6,  -10, 1,   -10,
  -22, -25, -13, 2,   10,  -6,  -8,  33,  24,  -6,  -20, 0,   16,  15,  2,
  20,  39,  36,  20,  4,   3,   22,  22,  -12, 4,   32,  27,  5,   -14, -16,
  -1,  -2,  -9,  -4,  6,   1,   -13, -32, -29, -8,  -18, -14, 8,   24,  24,
  0,   -22, -3,  -17, -36, -32, 0,   30,  42,  32,  15,  16,  4,   -14, -25,
  -18, 10,  43,  2,   10,  21,  18,  6,   -2,  -10, 2,   10,  14,  14,  8,
  7,   4,   0,   -4,  1,   8,   12,  11,  0,   -16, -26, -21, -13, -17, -4,
  6,   14,  2,   -18, -33, 5,   -7,  -15, -10, -4,  8,   11,  -4,  6,   6,
  -6,  -8,  -4,  0,   6,   9,   9,   12,  14,  10,  6,   4,   0,   0,   26,
  38,  20,  4,   0,   4,   0,   -14, 3,   12,  18,  18,  0,   -11, 1,   6,
  6,   -4,  2,   10,  -4,  -18, -18, -5,  6,   -2,  2,   18,  26,  8,   -18,
  -27, 25,  39,  22,  6,   11,  19,  2,   -24, -8,  12,  22,  13,  2,   -8,
  -16, -20, -33, -44, -14, 6,   2,   -8,  -14, -20, 16,  8,   -4,  -18, -6,
  18,  21,  17,  -8,  -1,  11,  10,  -6,  -16, -18, 0,   0,   -12, -16, -13,
  -4,  6,   10,  8,   8,   7,   -1,  -9,  -8,  -12, -8,  6,   -29, -22, -2,
  11,  20,  11,  -4,  -12, 8,   2,   -20, -36, -26, 8,   32,  25,  -14, -16,
  -2,  10,  0,   -19, -21, 4,   -3,  -22, -30, -16, 5,   28,  41,  26,  -8,
  -5,  -6,  -12, -11, -18, -30, -39, 14,  22,  10,  -14, -14, 10,  24,  10,
  -27, -25, 4,   18,  4,   -14, -4,  39,  4,   0,   -12, -9,  16,  14,  -8,
  -22, 18,  22,  0,   -12, 7,   18,  -3,  -36, -29, -17, 10,  3,   -17, -7,
  16,  12,  -2,  -16, -12, -3,  -12, -14, 4,   18,  2,   -10, -12, 4,   17,
  13,  5,   12,  -32, -42, -36, -17, 5,   12,  6,   6,   -10, -12, -24, -34,
  -14, 12,  18,  12,  -8,  -6,  2,   0,   -2,  -4,  14,  29,  -9,  -20, -16,
  -9,  -13, -9,  9,   23,  5,   -6,  -14, -8,  -11, -11, 10,  29,  12,  21,
  6,   0,   9,   14,  17,  26,  -12, 4,   12,  2,   2,   6,   4,   9,   -28,
  -34, -10, 1,   -7,  -8,  -8,  -16, -15, -5,  20,  24,  14,  0,   -11, -7,
  14,  7,   -14, -20, -9,  4,   -3,  -10, -14, -15, -6,  0,   -6,  -11, -20,
  -26, 4,   -2,  -1,  -6,  4,   20,  26,  1,   -17, -18, 0,   15,  13,  -3,
  1,   18,  -4,  -19, -26, -9,  14,  8,   -18, -23, 9,   19,  -7,  -34, -28,
  1,   15,  0,   -38, -35, -4,  10,  7,   10,  22,  34,  18,  11,  -13, -20,
  -14, 0,   6,   9,   -28, -20, 5,   6,   -9,  -7,  1,   4,   -2,  -16, -18,
  -12, -12, 2,   14,  13,  13,  -18, -22, 0,   22,  6,   -5,  12,  17,  10,
  -3,  -4,  19,  35,  16,  -6,  15,  30,  13,  -10, 3,   14,  -14, -40, -8,
  4,   9,   -12, -26, -12, 14,  10,  -4,  8,   29,  20,  -12, -28, 0,   38,
  45,  32,  -14, -17, -3,  -2,  -6,  -6,  2,   19,  10,  -13, -12, 0,   3,
  1,   -18, -6,  14,  -8,  -26, -8,  11,  6,   -19, -27, 4,   12,  -14, -34,
  -10, 30,  14,  0,   -16, 2,   15,  -2,  10,  32,  -24, -18, -7,  8,   17,
  3,   -10, 4,   -2,  -8,  -7,  -14, -6,  17,  3,   -34, 4,   4,   10,  12,
  13,  28,  17,  -18, -19, -20, -8,  -4,  2,   5,   0,   0,   22,  28,  15,
  2,   7,   16,  6,   -6,  -3,  -2,  0,   6,   -2,  -16, -8,  16,  6,   -14,
  -25, -32, -20, -10, -14, -24, -4,  -4,  14,  16,  4,   0,   12,  25,  30,
  15,  -2,  12,  16,  7,   2,   6,   24,  22,  -8,  -12, -10, -20, -26, -13,
  20,  46,  20,  -18, -12, 12,  26,  14,  12,  -2,  -16, -18, -20, -14, -14,
  -16, -12, -2,  26,  26,  4,   -2,  24,  34,  38,  24,  -22, -11, 26,  23,
  -2,  -12, 1,   -3,  2,   -17, -20, -12, -20, -23, -6,  -19, 0,   6,   -12,
  -5,  14,  -8,  4,   -3,  0,   18,  8,   -16, -6,  14,  9,   8,   -16, -24,
  2,   9,   6,   2,   -40, -26, 15,  18,  9,   7,   1,   6,   19,  36,  30,
  -4,  -22, -18, -8,  -10, 2,   4,   -2,  -22, -34, -28, 14,  36,  -6,  -12,
  -16, -10, -2,  -17, -10, 38,  2,   12,  12,  10,  0,   18,  18,  10,  -8,
  -4,  21,  18,  -8,  -19, -8,  12,  28,  12,  -6,  -11, -4,  -10, -6,  17,
  21,  21,  3,   6,   13,  5,   -4,  2,   -9,  5,   4,   -16, -25, -14, -5,
  -9,  14,  22,  12,  2,   -5,  -6,  1,   18,  19,  0,   -16, -10, -5,  -8,
  -6,  -9,  30,  28,  10,  6,   -10, -17, 14,  24,  17,  -4,  -29, -19, 8,
  -5,  -21, 18,  -38, -6,  13,  -14, -26, -11, 8,   22,  0,   -10, 14,  16,
  -4,  1,   0,   -21, 20,  -10, -8,  10,  -14, -22, 14,  40,  5,   -5,  -15,
  16,  32,  8,   -9,  -2,  2,   -10, -8,  17,  36,  28,  0,   -32, 23,  26,
  8,   -11, -26, -12, 8,   -4,  23,  4,   -27, -16, 0,   4,   -2,  -18, 13,
  20,  16,  -6,  -23, -24, 11,  45,  16,  9,   -6,  -13, 10,  9,   -10, 6,
  2,   12,  20,  5,   -26, -24, 0,   12,  12,  -10, -10, 2,   -6,  -11, 7,
  8,   5,   10,  4,   8,   -2,  -20, -6,  23,  -34, -15, 17,  18,  2,   -8,
  0,   -2,  -21, -6,  24,  9,   -20, -22, 4,   11,  11,  -7,  -20, 8,   21,
  -16, -18, 21,  -3,  -3,  -11, 0,   -2,  -14, -2,  24,  -24, -12, 0,   -8,
  0,   24,  10,  -1,  -20, -20, 7,   -1,  -3,  38,  22,  -28, 14,  -5,  -10,
  8,   22,  22,  -6,  -46, 6,   6,   0,   10,  12,  -8,  -8,  1,   -18, 0,
  14,  4,   -14, -14, -5,  -16, -9,  0,   16,  10,  8,   3,   8,   30,  34,
  14,  -2,  10,  4,   -14, -26, -8,  23,  -2,  -4,  5,   -12, -14, 10,  3,
  17,  30,  3,   -8,  2,   -22, -21, 32,  -9,  7,   -17, -33, 5,   20,  -4,
  -6,  -39, -14, 32,  10,  -31, -16, 9,   8,   16,  -2,  2,   2,   0,   13,
  20,  -14, -19, -6,  20,  2,   -36, -39, 14,  60,  22,  14,  -12, -2,  18,
  1,   -18, -6,  6,   -9,  -4,  5,   7,   1,   -4,  18,  -6,  8,   22,  10,
  -12, -22, -16, 3,   21,  17,  -15, -15, 2,   0,   -6,  12,  -12, 1,   14,
  -1,  -22, -16, 2,   22,  14,  8,   -4,  -12, -16, 8,   12,  -16, -10, -10,
  4,   9,   -8,  -12, 6,   28,  11,  6,   -15, -4,  19,  6,   -18, -1,  -20,
  -17, 14,  16,  -10, -2,  8,   -12, -10, -8,  29,  22,  -9,  -7,  6,   2,
  60,  46,  -12, -12, 12,  -5,  -28, -6,  -12, 0,   -22, -16, -2,  -16, -6,
  18,  -12, -4,  -1,  -6,  -5,  -6,  -4,  20,  15,  26,  20,  -4,  -5,  22,
  2,   -22, -2,  -7,  -5,  0,   -16, -14, 0,   10,  -22, -12, 10,  22,  13,
  -2,  2,   -9,  -2,  -12, -2,  19,  -2,  -40, -27, 20,  6,   7,   8,   -8,
  -19, 10,  18,  10,  2,   -22, -22, -6,  24,  16,  -8,  -1,  9,   -4,  -13,
  12,  33,  -7,  -34, -2,  10,  17,  18,  6,   -14, -16, 8,   13,  10,  -2,
  -16, -28, -18, 21,  24,  -6,  -1,  8,   0,   -6,  6,   24,  8,   -32, -2,
  -8,  -6,  10,  5,   -12, -8,  16,  8,   14,  20,  4,   -5,  12,  16,  1,
  -20, 4,   14,  -22, -24, 8,   -2,  -17, -4,  -3,  -20, 7,   22,  2,   -8,
  -8,  -12, 6,   29,  33,  -8,  -38, -8,  22,  -2,  8,   4,   -22, -29, 2,
  22,  4,   -20, -32, -23, -2,  18,  9,   -12, -4,  -3,  -4,  24,  32,  6,
  -26, -14, 19,  -11, 12,  16,  -16, -6,  36,  24,  -34, 22,  0,   -16, 12,
  20,  -16, -34, -7,  12,  7,   5,   8,   -17, -26, 6,   36,  8,   6,   3,
  -18, -16, 12,  10,  -18, 0,   -1,  -4,  -6,  -4,  6,   2,   4,   -14, -3,
  -13, -2,  13,  -6,  -8,  12,  -31, -18, -11, -2,  20,  18,  -12, -8,  -14,
  -8,  34,  30,  -7,  -18, -2,  10,  4,   8,   -8,  -23, -15, -8,  -9,  -11,
  30,  6,   -30, 4,   27,  0,   10,  38,  -6,  -4,  -3,  -8,  -12, 10,  1,
  -24, -2,  1,   -10, -20, -17, 10,  21,  -18, -18, -17, -20, 4,   28,  6,
  -1,  10,  0,   6,   19,  -10, 0,   16,  0,   0,   22,  -6,  12,  20,  -7,
  14,  12,  -24, 36,  -2,  -32, 14,  14,  -29, -13, 8,   -16, -9,  -12, -2,
  12,  -16, -26, 22,  -20, -6,  26,  32,  10,  -14, 0,   15,  -7,  -6,  18,
  10,  -36, -28, 9,   -4,  -32, 3,   10,  -6,  -15, 2,   18,  14,  -24, 10,
  14,  -8,  20,  17,  -22, 2,   6,   -12, -5,  23,  18,  -19, -24, 16,  10,
  -10, 2,   31,  -2,  -30, -4,  8,   -15, -7,  4,   7,   -4,  -10, 2,   9,
  -10, 2,   4,   -2,  10,  7,   3,   12,  -10, 22,  26,  -28, -26, 15,  -6,
  -24, 26,  -16, -34, -2,  9,   19,  27,  8,   2,   -14, -10, 23,  10,  4,
  4,   -42, -28, 3,   4,   -11, 11,  4,   -18, 8,   -11, 2,   4,   -11, 23,
  0,   -42, 28,  6,   -10, 3,   10,  0,   12,  6,   2,   16,  -2,  -8,  21,
  -1,  -12, 9,   -16, -8,  16,  4,   -34, -10, 34,  16,  -34, -2,  -24, -7,
  12,  15,  18,  10,  -19, 10,  -17, -4,  24,  14,  -9,  -10, -14, -37, -10,
  2,   14,  22,  -2,  -21, 12,  -14, 20,  30,  2,   0,   -14, -20, 14,  6,
  -2,  16,  4,   -20, -2,  14,  3,   29,  6,   -7,  2,   -14, -10, 18,  -19,
  -5,  -12, -4,  7,   -14, -12, 22,  -6,  -24, -3,  10,  -7,  -14, 16,  18,
  -19, -28, 8,   29,  10,  0,   0,   -8,  -11, -29, -4,  0,   -9,  4,   3,
  -16, 27,  -14, 16,  24,  10,  -1,  -12, -10, -10, -4,  -26, -18, 28,  12,
  -22, 14,  28,  5,   6,   6,   16,  0,   -27, -11, -15, -13, 2,   12,  5,
  -16, -6,  20,  16,  18,  2,   -18, -2,  28,  3,   -34, 18,  10,  15,  3,
  -18, -3,  0,   -2,  26,  -34, -6,  10,  -22, 4,   42,  7,   -18, 13,  4,
  6,   16,  4,   -35, -28, -2,  18,  6,   2,   -16, -22, 14,  38,  0,   2,
  -24, -14, 2,   22,  0,   -14, -12, 12,  16,  17,  2,   -19, -10, 12,  0,
  4,   -22, -28, -13, 8,   6,   21,  -2,  2,   7,   14,  7,   5,   10,  0,
  -18, 18,  -4,  -18, 5,   20,  -8,  -9,  16,  25,  2,   -6,  8,   -15, -6,
  12,  -11, 5,   -18, -24, 1,   11,  1,   10,  14,  -26, 29,  24,  -32, 3,
  21,  -14, -22, -12, 0,   2,   -8,  4,   4,   0,   20,  16,  -2,  -18, 8,
  -10, -2,  23,  -24, -28, -18, 18,  18,  -18, 4,   40,  -23, -13, 8,   22,
  -4,  -4,  10,  -2,  -20, -2,  12,  28,  18,  -14, -8,  14,  -4,  -8,  -23,
  -26, -20, -30, -11, 28,  4,   -10, 0,   14,  33,  29,  16,  24,  -22, -2,
  0,   1,   -10, -6,  -2,  -17, -3,  0,   -22, -20, 10,  21,  -6,  -24, 10,
  -6,  -1,  11,  33,  14,  1,   4,   10,  -22, -20, 0,   7,   -2,  -26, -28,
  -2,  2,   13,  18,  10,  -3,  -8,  10,  18,  20,  3,   -2,  8,   11,  2,
  10,  2,   -18, -6,  18,  -10, -16, -1,  -8,  -18, 21,  38,  12,  -32, -2,
  4,   -10, 22,  -28, -12, -6,  -25, -10, 38,  16,  -12, 28,  9,   -3,  8,
  -1,  -22, -10, -6,  -25, -18, 6,   12,  5,   9,   26,  8,   14,  16,  26,
  4,   -16, -17, -5,  -22, 12,  -15, -12, 5,   -9,  -14, 3,   23,  19,  2,
  -16, 12,  20,  -8,  -2,  -2,  -1,  -30, -4,  17,  -10, -12, 4,   -11, 12,
  -14, 5,   26,  10,  -6,  2,   15,  -16, -5,  24,  2,   -18, 2,   -2,  -20,
  32,  17,  2,   -11, -1,  -8,  -13, 20,  34,  12,  -11, -28, 8,   24,  -11,
  0,   17,  -11, -32, -22, 7,   6,   -20, 6,   8,   -1,  -30, 9,   38,  -1,
  -18, 20,  34,  -34, -8,  20,  -22, -8,  23,  -8,  14,  -10, -2,  12,  8,
  16,  6,   -10, -20, 18,  -10, -24, 18,  -4,  -42, 17,  -4,  16,  -18, -14,
  29,  3,   -18, 20,  4,   -9,  -13, -8,  25,  12,  -26, 12,  5,   -9,  -6,
  -10, 17,  6,   -34, 13,  6,   -6,  -13, 17,  20,  -6,  2,   10,  -6,  -2,
  -1,  8,   -4,  -8,  10,  -16, 30,  -13, -24, 24,  32,  -2,  -21, 4,   -1,
  -9,  -22, 4,   15,  -12, -22, 14,  -9,  -8,  0,   20,  32,  -6,  -29, 24,
  3,   -18, 10,  22,  -14, -4,  -5,  2,   -22, -20, 16,  28,  -14, -6,  11,
  -12, -23, 22,  22,  -3,  2,   -12, -10, 10,  -5,  -9,  10,  -4,  -16, -10,
  4,   -2,  28,  -14, 12,  21,  -16, -1,  16,  2,   -2,  -3,  -4,  -12, 4,
  -5,  0,   8,   32,  -16, 6,   32,  -11, -2,  21,  -14, 28,  -24, -14, 0,
  -19, -15, 3,   2,   -20, 11,  2,   5,   5,   2,   13,  -5,  8,   -26, -22,
  16,  11,  -20, 4,   8,   -44, 0,   40,  -7,  -14, 21,  -15, -13, 2,   14,
  12,  -8,  15,  0,   -25, 36,  -4,  0,   11,  -13, -16, 17,  2,   -8,  8,
  12,  -15, -12, 28,  -2,  -14, -4,  -14, 10,  -8,  -20, 32,  2,   -32, 19,
  1,   -2,  -14, -2,  17,  10,  -7,  8,   17,  -17, -2,  22,  6,   -1,  -4,
  -20, 9,   -5,  -9,  -6,  16,  -4,  -30, 36,  -14, -18, 10,  4,   -10, 10,
  12,  -16, 10,  5,   -9,  28,  18,  -20, -6,  5,   -46, 18,  12,  -26, 4,
  0,   -16, 16,  -15, 2,   14,  0,   6,   4,   -6,  -6,  -16, 9,   6,   -6,
  -2,  -10, -12, 10,  -26, 9,   22,  -17, 0,   18,  11,  -2,  -7,  28,  26,
  -9,  -10, 1,   -8,  -20, 14,  -4,  -16, -16, -16, -4,  21,  9,   -2,  16,
  17,  -18, 0,   28,  -2,  -22, 36,  -20, -30, 14,  2,   -24, 10,  12,  0,
  -15, 8,   19,  -27, 1,   40,  -26, 32,  -25, -4,  24,  -22, -5,  30,  -22,
  -14, 0,   4,   -2,  -3,  0,   -3,  0,   -18, 14,  12,  7,   -6,  -12, 24,
  -2,  -8,  12,  0,   7,   -18, -16, 32,  -26, -26, 4,   24,  -12, -16, 11,
  -3,  3,   -9,  2,   39,  -8,  -26, 22,  -12, 10,  -10, 10,  6,   -10, -21,
  4,   12,  -8,  -32, 27,  -3,  -16, 14,  -2,  4,   2,   -12, 21,  14,  -24,
  14,  24,  -46, 20,  4,   -5,  1,   -10, -5,  10,  -22, 18,  -13, 25,  -7,
  -5,  12,  8,   -16, 3,   -38, 35,  -6,  -16, 18,  -10, -6,  10,  -1,  -4,
  5,   -8,  -14, 16,  -22, 2,   3,   7,   22,  0,   2,   20,  -14, 15,  -32,
  12,  4,   -30, -13, 11,  -19, 2,   0,   15,  -6,  2,   17,  -4,  4,   2,
  -2,  12,  -8,  8,   -2,  -11, 14,  -13, 3,   -12, 2,   -11, -14, 19,  -14,
  8,   6,   -11, 28,  -8,  -5,  42,  -34, 10,  -10, -4,  13,  -15, -12, -3,
  0,   2,   -54, 40,  -6,  -26, 28,  -1,  2,   0,   -5,  18,  6,   1,   4,
  -6,  9,   -14, 8,   -4,  5,   -10, -4,  22,  -28, 18,  -2,  -4,  16,  -5,
  -16, 20,  -18, 5,   11,  -14, -2,  2,   -8,  -4,  4,   -2,  -33, 38,  -8,
  -10, 24,  -12, 10,  4,   -6,  9,   -18, 1,   8,   -32, 28,  -17, -10, 0,
  20,  -19, 1,   30,  -26, 9,   -12, 8,   10,  -14, 7,   9,   -23, 21,  -28,
  27,  -4,  -5,  -2,  -7,  8,   -15, -7,  29,  -4,  -24, 21,  8,   -15, 14,
  28,  -20, -1,  2,   -5,  10,  -10, 0,   34,  -39, 19,  8,   -16, 16,  -16,
  -3,  -2,  -1,  12,  -18, 5,   16,  -38, 28,  18,  -14, -15, 17,  0,   -23,
  22,  -10, -18, 24,  -12, 2,   30,  -11, 7,   2,   0,   13,  -24, -2,  9,
  -41, 23,  -14, 8,   8,   -11, 12,  12,  5,   10,  0,   18,  -20, 1,   2,
  -8,  -2,  -11, -6,  2,   -4,  8,   -2,  -3,  8,   -14, 12,  1,   -14, 20,
  -6,  -8,  9,   -7,  -1,  3,   -3,  4,   -6,  -6,  12,  -3,  2,   18,  -17,
  17,  8,   -21, 19,  -7,  -7,  1,   -8,  12,  -17, -8,  32,  -34, 24,  6,
  -19, 16,  6,   -15, 4,   0,   -8,  -34, 35,  2,   -33, 22,  6,   -16, 20,
  5,   -6,  -7,  16,  1,   -16, 26,  -23, -18, 18,  4,   -24, 16,  12,  -26,
  14,  6,   -10, 18,  -14, -8,  22,  -22, 14,  26,  -28, -2,  22,  -14, -10,
  20,  -12, -27, 28,  -10, -18, 14,  -4,  5,   4,   10,  -6,  -8,  28,  -6,
  -15, 28,  -18, -16, 17,  -6,  -22, 6,   -2,  -10, 6,   -26, 37,  -12, 0,
  24,  -16, 24,  -6,  4,   13,  -24, 0,   4,   -22, 15,  -14, 4,   -4,  6,
  -8,  4,   14,  -12, 7,   -2,  -2,  15,  -6,  5,   14,  -13, 9,   -4,  -10,
  -6,  -10, -7,  -8,  2,   -6,  -11, 30,  8,   18,  30,  -4,  16,  -2,  -18,
  -4,  -26, -24, -23, -17, -8,  -6,  14,  22,  16,  32,  33,  12,  20,  3,
  -12, -14, -12, -36, -28, -14, -28, -6,  20,  -8,  12,  20,  3,   26,  8,
  14,  -4,  -6,  10,  -12, -12, 10,  -18, 3,   -21, 32,  -20, -4,  20,  -20,
  22,  -4,  -15, 25,  -22, 6,   20,  -22, 25,  -19, -6,  14,  -9,  -17, 21,
  -22, 0,   -2,  -8,  16,  -9,  3,   24,  -2,  8,   9,   -10, 8,   -16, 0,
  -8,  -19, 6,   -22, -3,  20,  2,   -10, 22,  16,  -12, 24,  19,  -34, 4,
  3,   -28, 6,   -8,  -12, -15, 7,   14,  -14, 3,   22,  -16, 16,  -4,  14,
  -11, 6,   12,  -14, 5,   0,   -8,  6,   -9,  -6,  4,   -7,  0,   0,   14,
  -4,  3,   12,  6,   0,   -2,  4,   -18, 12,  -12, -13, 2,   -10, 2,   3,
  -12, 26,  -16, 14,  24,  -25, 30,  -14, -24, 20,  -9,  -16, 12,  -22, 5,
  -6,  -22, 32,  -20, -2,  24,  -18, 14,  1,   -22, 34,  -28, 8,   20,  -38,
  32,  -14, -12, 25,  -18, 6,   18,  -36, 31,  -16, 15,  -20, 15,  -15, -6,
  17,  -25, 17,  6,   -7,  10,  0,   8,   -7,  17,  -7,  -12, 24,  -20, -12,
  17,  -29, 14,  -8,  11,  -15, 16,  3,   -7,  18,  -7,  5,   -2,  8,   -4,
  -6,  3,   -6,  -4,  4,   -6,  20,  -12, -6,  23,  -28, 26,  -14, 29,  -32,
  14,  -8,  -8,  17,  -18, 10,  9,   -12, 12,  -4,  1,   14,  -10, 4,   -12,
  14,  -10, -12, 19,  -32, 23,  -12, 16,  -14, 12,  0,   -8,  22,  -14, 7,
  -8,  15,  -25, 19,  -18, 11,  -4,  1,   -14, 21,  -16, -4,  11,  -12, 9,
  -7,  28,  -26, 17,  2,   -13, 27,  -21, 12,  -28, 24,  -22, -5,  14,  -26,
  21,  -12, 22,  -22, 24,  -8,  0,   16,  -13, 6,   2,   13,  -20, 26,  -23,
  16,  -6,  2,   -28, 30,  -35, 24,  -21, 10,  -1,  -1,  10,  10,  -20, 38,
  -35, 28,  -18, 9,   -14, 14,  -18, -2,  9,   -16, 16,  -10, 12,  -4,  -6,
  16,  -16, 14,  -14, 6,   -14, 16,  -19, 10,  -6,  3,   5,   -3,  8,   14,
  -26, 28,  -14, 8,   -4,  1,   4,   -10, 2,   1,   -10, 10,  -6,  2,   2,
  -4,  11,  -7,  4,   6,   -9,  6,   -7,  8,   -13, 12,  -8,  -2,  2,   -1,
  7,   -9,  18,  -16, 14,  -4,  -2,  3,   17,  -40, 44,  -44, 43,  -33, 20,
  -6,  -2,  -2,  12,  -8,  12,  -18, 9,   -8,  -6,  7,   -14, 22,  -29, 29,
  -25, 15,  -11, 18,  -14, 16,  -2,  -1,  4,   -3,  8,   -5,  3,   -5,  3,
  -6,  -4,  2,   -2,  0,   5,   -2,  4,   -2,  -2,  2,   -12, 20,  -26, 23,
  -19, 8,   -4,  2,   -10, 18,  -18, 18,  -12, 6,   -1,  2,   4,   -8,  10,
  -10, 12,  -12, 2,   0,   8,   -16, 30,  -34, 26,  -26, 16,  -6,  16,  -34,
  38,  -36, 29,  -17, 14,  0,   -6,  0,   13,  -13, 18,  -15, 9,   -8,  -3,
  8,   -10, 18,  -24, 20,  -14, 9,   14,  -20, 26,  -29, 32,  -26, 18,  -6,
  2,   -12, 16,  -25, 26,  -22, 16,  -8,  -2,  6,   -7,  18,  -18, 18,  -12,
  2,   -6,  12,  -12, 4,   3,   -8,  4,   0,   16,  -30, 32,  -27, 14,  -9,
  8,   -4,  -8,  13,  -10, 8,   2,   -6,  7,   -4,  -10, 16,  -24, 27,  -35,
  28,  -18, 7,   1,   2,   -7,  12,  -8,  4,   2,   0,   -16, 20,  -21, 9,
  0,   -8,  6,   -2,  18,  -20, 18,  2,   -12, 22,  -18, 8,   -28, 37,  -41,
  20,  -10, -12, 10,  -8,  11,  -14, 16,  7,   -18, 34,  -22, 15,  -8,  12,
  -12, -3,  12,  -26, 18,  -14, 4,   -3,  4,   8,   -17, 25,  -16, 12,  -15,
  22,  -29, 24,  -15, 4,   0,   -3,  5,   -4,  4,   0,   -3,  4,   -3,  2,
  6,   -11, 19,  -22, 24,  -20, 14,  -2,  -6,  4,   -8,  8,   -8,  3,   -2,
  -2,  -16, 24,  -26, 30,  -26, 20,  -10, 6,   2,   -2,  4,   -2,  2,   -4,
  0,   -1,  -4,  4,   0,   -4,  3,   -4,  5,   0,   -5,  8,   -11, 10,  -8,
  6,   -6,  2,   20,  -22, 30,  -28, 22,  -12, 6,   0,   12,  -26, 32,  -42,
  40,  -32, 20,  -8,  -12, 22,  -32, 41,  -36, 30,  -16, 8,   6,   -10, 15,
  -20, 19,  -18, 8,   -6,  3,   -6,  2,   -2,  2,   1,   1,   2,   -2,  4,
  4,   -4,  6,   -4,  4,   -2,  13,  -23, 26,  -29, 22,  -16, 9,   -4,  -3,
  -4,  14,  -15, 16,  -12, 8,   -2,  4,   0,   -2,  8,   -10, 10,  -8,  4,
  10,  -21, 30,  -36, 30,  -24, 16,  -6,  8,   -8,  6,   -2,  4,   -3,  2,
  0,   4,   -14, 21,  -23, 18,  -14, 12,  -8,  -3,  10,  -17, 20,  -16, 6,
  -1,  -1,  6,   -18, 30,  -32, 26,  -18, 12,  -2,  -14, 24,  -36, 37,  -32,
  18,  -12, 3,   12,  -20, 34,  -32, 28,  -18, 14,  -2,  -4,  8,   -13, 14,
  -8,  4,   -4,  0,   4,   -6,  9,   -7,  0,   0,   0,   0,   6,   -13, 16,
  -18, 17,  -14, 6,   -4,  -10, 18,  -24, 32,  -33, 27,  -15, 8,   8,   -13,
  20,  -24, 21,  -18, 10,  -6,  -2,  4,   -8,  12,  -11, 10,  -6,  4,   0,
  2,   -4,  2,   -4,  2,   -1,  1,   10,  -16, 20,  -18, 20,  -18, 10,  -6,
  -10, 18,  -28, 28,  -29, 22,  -13, 6,   11,  -18, 24,  -26, 26,  -18, 12,
  -4
};

static const int32_t mdt8x8_mode7[4096] = {
  0,   1,   2,   2,   2,   2,   4,   4,   0,   2,   2,   2,   2,   2,   4,
  7,   1,   2,   2,   2,   2,   4,   9,   14,  1,   2,   2,   3,   6,   11,
  16,  20,  2,   2,   4,   8,   13,  19,  23,  24,  2,   4,   9,   16,  22,
  26,  28,  29,  4,   11,  19,  25,  28,  30,  30,  30,  12,  21,  26,  28,
  30,  30,  30,  29,  4,   10,  16,  16,  18,  23,  29,  30,  6,   16,  20,
  18,  18,  24,  34,  33,  6,   16,  18,  16,  18,  26,  32,  26,  6,   12,
  16,  18,  22,  23,  19,  12,  6,   11,  15,  18,  16,  11,  4,   0,   8,
  10,  10,  10,  4,   -2,  -6,  -9,  5,   6,   3,   -2,  -7,  -10, -13, -15,
  -1,  -2,  -5,  -10, -13, -15, -16, -16, 6,   15,  18,  16,  18,  26,  30,
  22,  8,   18,  20,  16,  17,  22,  20,  8,   6,   14,  14,  12,  8,   0,
  -11, -18, 5,   6,   4,   -3,  -16, -28, -30, -23, 0,   -4,  -11, -20, -29,
  -30, -20, -8,  -4,  -10, -17, -21, -18, -8,  2,   9,   -8,  -12, -14, -8,
  2,   12,  18,  21,  -4,  -4,  0,   8,   18,  21,  22,  22,  -8,  -20, -28,
  -30, -29, -23, -14, -4,  -10, -22, -24, -15, -1,  10,  12,  8,   -4,  -6,
  1,   16,  31,  32,  18,  2,   5,   14,  24,  31,  26,  10,  -6,  -14, 10,
  20,  24,  14,  -4,  -18, -20, -12, 10,  12,  1,   -12, -20, -17, -6,  4,
  1,   -5,  -13, -14, -8,  2,   13,  18,  -6,  -10, -8,  1,   11,  18,  20,
  19,  -16, -44, -49, -20, 12,  12,  -8,  -10, -14, -22, -2,  27,  36,  15,
  -8,  -8,  4,   18,  36,  36,  11,  -10, -8,  2,   14,  24,  18,  -3,  -22,
  -14, 6,   14,  7,   2,   -13, -20, -10, 5,   13,  10,  -6,  -15, -13, -2,
  10,  12,  6,   0,   -4,  -4,  2,   8,   8,   1,   -6,  -10, 2,   6,   6,
  2,   -5,  -11, -12, -10, 10,  10,  2,   5,   27,  40,  22,  0,   0,   -16,
  -18, 5,   24,  9,   -27, -36, -9,  -28, -20, 8,   16,  -14, -43, -34, -4,
  -3,  12,  23,  13,  -6,  -12, -4,  10,  25,  33,  22,  4,   4,   10,  10,
  17,  24,  18,  6,   -2,  2,   6,   5,   12,  10,  2,   -2,  -2,  -2,  -2,
  0,   3,   0,   -3,  -4,  -4,  -3,  -2,  -1,  0,   0,   14,  29,  27,  -2,
  -35, -44, 10,  24,  28,  22,  2,   -24, -36, -32, 16,  28,  22,  4,   -10,
  -6,  6,   9,   10,  15,  12,  6,   9,   19,  20,  10,  9,   12,  12,  10,
  8,   7,   2,   -3,  4,   2,   -4,  -10, -13, -12, -6,  3,   -4,  -10, -16,
  -17, -12, -4,  6,   14,  -12, -18, -14, -4,  6,   14,  16,  16,  18,  41,
  28,  -16, -42, -28, -13, -20, 17,  28,  11,  -11, -8,  8,   -1,  -27, 12,
  18,  16,  20,  28,  20,  -9,  -28, 13,  20,  20,  17,  7,   -8,  -12, -4,
  8,   5,   -2,  -7,  -10, -6,  8,   17,  -1,  -5,  -6,  -2,  8,   14,  15,
  8,   0,   2,   8,   14,  14,  6,   -6,  -14, 6,   10,  11,  4,   -6,  -16,
  -21, -20, 12,  19,  12,  0,   -3,  2,   8,   12,  -2,  -12, -17, -10, -6,
  -9,  -2,  14,  -16, -26, -15, 4,   4,   -8,  1,   21,  -8,  2,   14,  9,
  -4,  0,   20,  32,  8,   14,  4,   -16, -16, 10,  30,  31,  -1,  -15, -34,
  -30, -4,  16,  19,  14,  -23, -36, -34, -14, 4,   8,   2,   -1,  -27, -30,
  -16, -3,  -2,  -5,  -7,  -6,  20,  29,  -10, -52, -34, 19,  26,  -10, 12,
  14,  -4,  -12, 11,  27,  4,   -21, 6,   9,   9,   10,  2,   -14, -10, 10,
  1,   -4,  -11, -12, -12, -3,  20,  28,  -12, -18, -12, 2,   14,  18,  12,
  -2,  -10, -5,  10,  12,  4,   -9,  -18, -12, 8,   7,   -2,  -16, -22, -16,
  1,   17,  -6,  -14, -22, -18, -3,  12,  22,  24,  -33, -25, 13,  10,  -36,
  -37, 23,  56,  -20, -7,  26,  20,  -8,  -16, -5,  -2,  6,   14,  12,  2,
  0,   -8,  -32, -36, 13,  8,   -8,  -8,  8,   12,  -2,  -6,  4,   0,   -1,
  8,   16,  18,  20,  16,  -1,  2,   8,   7,   -1,  0,   8,   13,  0,   -2,
  -6,  -12, -14, -7,  1,   8,   -10, -14, -16, -12, -2,  4,   4,   4,   -12,
  -31, -32, -16, 2,   14,  6,   -13, 17,  30,  16,  -6,  0,   21,  12,  -12,
  27,  26,  -8,  -25, -4,  11,  5,   -4,  -16, -33, -27, 2,   14,  -2,  -10,
  3,   -20, -14, 16,  22,  -4,  -14, 8,   26,  4,   12,  4,   -15, -14, 12,
  30,  24,  2,   -6,  -19, -16, 6,   18,  6,   -10, -7,  -14, -10, 1,   2,
  -8,  -17, -16, -14, -16, 8,   22,  14,  8,   8,   10,  12,  -6,  -34, -24,
  12,  28,  -6,  -33, 26,  10,  -32, -30, 17,  40,  4,   -26, 20,  18,  -6,
  -10, 10,  28,  19,  3,   0,   -8,  -14, -6,  6,   8,   6,   2,   -22, -32,
  -20, 0,   4,   -9,  -14, -8,  -18, -16, 2,   7,   -2,  -9,  -5,  0,   -2,
  6,   11,  6,   1,   3,   6,   4,   -12, -11, 15,  36,  14,  -26, -38, -14,
  10,  0,   -7,  4,   16,  17,  15,  16,  -3,  -14, -16, 6,   32,  24,  0,
  -6,  -10, -10, 0,   1,   -18, -31, -6,  22,  -10, -15, -11, -12, -18, -6,
  20,  27,  -4,  9,   18,  13,  7,   8,   2,   -2,  18,  24,  8,   -12, -15,
  -6,  2,   12,  7,   -10, -30, -30, -12, 4,   10,  14,  8,   24,  8,   -8,
  -10, -16, -17, 1,   -10, -12, 10,  48,  50,  9,   -18, -6,  -10, -26, -12,
  24,  28,  13,  6,   6,   -6,  -28, -40, -22, 12,  30,  14,  -12, -15, -17,
  -12, -4,  2,   -1,  -8,  -8,  -3,  2,   3,   -6,  -16, -14, 3,   16,  -6,
  -7,  -4,  1,   4,   7,   4,   0,   -8,  -2,  10,  14,  9,   0,   -10, -15,
  28,  22,  -4,  0,   16,  14,  1,   1,   -14, -33, -24, -6,  -12, -14, -2,
  4,   -4,  11,  15,  -8,  -15, 8,   12,  -4,  36,  38,  -2,  -22, 2,   12,
  2,   0,   -4,  -20, -16, 7,   0,   -24, -8,  25,  -12, 0,   21,  10,  -24,
  -14, 22,  32,  13,  20,  3,   -21, -10, 20,  20,  0,   10,  0,   -20, -18,
  2,   2,   -16, -20, -30, -6,  36,  14,  -25, -6,  18,  4,   -20, -16, -5,
  -6,  4,   12,  -10, -26, 8,   11,  -4,  -4,  3,   -10, 1,   28,  12,  10,
  1,   -8,  -18, -16, 22,  39,  -18, -4,  21,  5,   -25, -21, -8,  -12, 10,
  21,  14,  -13, -16, -1,  -10, -26, 24,  12,  -14, -8,  20,  21,  -2,  -20,
  8,   2,   6,   22,  20,  1,   -8,  -4,  -22, -7,  13,  -2,  -9,  20,  20,
  -14, -19, -3,  16,  5,   -16, -18, -14, -2,  0,   -4,  -8,  12,  18,  -7,
  -3,  26,  -7,  -12, -4,  28,  33,  2,   -5,  9,   -8,  -16, -4,  2,   -16,
  -11, 6,   10,  -24, -32, -18, -18, -22, -6,  8,   12,  -8,  12,  16,  -8,
  -18, -13, -6,  8,   42,  44,  5,   -21, -17, -6,  4,   12,  12,  2,   -12,
  6,   18,  -16, -16, 41,  35,  16,  -32, -18, 6,   -15, -16, 15,  14,  10,
  10,  24,  6,   -20, -14, -5,  -7,  -4,  18,  24,  3,   8,   14,  -11, -36,
  -28, 2,   -2,  2,   27,  7,   -24, -18, -3,  -2,  -22, -12, 6,   -2,  0,
  26,  16,  -16, -19, 4,   5,   -2,  6,   18,  8,   0,   14,  14,  -6,  -12,
  -3,  18,  8,   -13, -4,  -5,  -30, -5,  44,  20,  6,   -11, 10,  27,  9,
  -14, -20, 4,   8,   4,   -20, -30, 0,   20,  8,   -15, -1,  4,   -15, -21,
  2,   14,  4,   3,   24,  24,  2,   -20, -24, -4,  16,  27,  8,   -18, -12,
  -4,  -4,  4,   14,  -6,  2,   11,  4,   -10, -12, 0,   10,  22,  30,  9,
  -26, -30, -7,  10,  12,  12,  18,  -10, -22, 6,   19,  2,   -3,  -24, -14,
  13,  16,  -9,  -27, -10, 18,  23,  14,  -12, -12, 6,   24,  14,  -22, 16,
  2,   -12, -12, 2,   20,  6,   -25, -14, 0,   15,  -22, -38, 8,   26,  4,
  10,  18,  -4,  -18, 14,  28,  -8,  -24, 19,  10,  -10, 4,   20,  -8,  -26,
  0,   16,  -8,  -14, 0,   -2,  -6,  12,  30,  -4,  -6,  9,   6,   -6,  11,
  19,  5,   14,  -10, -21, 0,   0,   -31, -31, 4,   18,  18,  7,   12,  16,
  2,   -2,  16,  -8,  -6,  12,  12,  6,   4,   -1,  -2,  -36, -32, -7,  4,
  -11, -30, -22, 4,   16,  14,  2,   20,  25,  5,   -3,  4,   -16, -10, 18,
  32,  8,   -1,  14,  12,  -40, -26, 4,   -10, -32, -11, 10,  2,   32,  -6,
  -34, 8,   14,  -8,  9,   20,  -2,  8,   18,  -1,  -25, -16, -4,  -11, -26,
  -2,  20,  0,   9,   26,  -10, -22, -19, -14, 2,   10,  13,  3,   15,  40,
  3,   -12, -22, -6,  -15, -24, 12,  24,  10,  6,   4,   0,   -23, -22, -17,
  -28, -2,  4,   15,  6,   -7,  -4,  -10, -18, -16, 2,   18,  19,  20,  16,
  4,   2,   -11, -11, -13, -16, -10, 8,   16,  6,   36,  30,  4,   6,   0,
  -30, -24, 20,  29,  -7,  -36, -2,  20,  0,   -6,  12,  4,   6,   0,   -8,
  -9,  4,   12,  8,   34,  38,  -8,  -38, -19, -1,  -6,  -9,  -11, 4,   24,
  12,  -13, -16, -4,  6,   2,   10,  16,  6,   0,   14,  15,  -2,  6,   -4,
  -14, -8,  11,  14,  -8,  -25, -19, -14, 6,   7,   0,   14,  20,  -6,  -9,
  6,   5,   -16, -22, 6,   9,   -40, -26, -12, 13,  13,  -3,  14,  25,  -12,
  -23, -11, 11,  -1,  -12, 22,  22,  -12, 0,   2,   -22, -40, -4,  19,  -10,
  -10, 22,  17,  -12, -12, 6,   -8,  -1,  36,  35,  20,  -6,  4,   5,   -8,
  12,  24,  4,   -10, -8,  0,   -11, -14, -6,  -13, 7,   2,   -8,  4,   6,
  -10, 6,   26,  -6,  0,   6,   4,   0,   2,   -14, -44, -16, -10, 12,  6,
  -12, 10,  31,  4,   -6,  -13, -4,  18,  16,  -6,  -7,  -5,  0,   5,   4,
  -4,  -6,  -4,  -10, -22, -30, -23, 10,  15,  18,  35,  10,  -30, -20, 0,
  10,  4,   16,  28,  10,  -5,  14,  -15, -49, -24, 16,  10,  -6,  0,   6,
  -12, -8,  18,  7,   -9,  -4,  4,   16,  15,  -10, -32, -10, 20,  5,   -8,
  -15, -8,  14,  24,  8,   -24, -18, 31,  46,  10,  -50, -18, 36,  14,  -14,
  -2,  9,   8,   -6,  -18, -16, 0,   6,   -4,  23,  20,  8,   -10, -14, 10,
  11,  -3,  -8,  -4,  8,   15,  8,   -8,  -14, 6,   -4,  -3,  -6,  -6,  -8,
  -11, 2,   20,  5,   15,  0,   -10, 10,  0,   -15, 25,  -36, -4,  5,   -13,
  15,  6,   -32, 4,   14,  24,  -4,  -26, -2,  14,  5,   10,  18,  -21, -16,
  38,  7,   -38, -6,  18,  39,  2,   -36, -7,  16,  8,   -10, -15, 0,   12,
  4,   -15, -2,  9,   0,   12,  8,   13,  2,   -6,  -3,  -4,  4,   21,  -14,
  -9,  10,  14,  -12, -24, -4,  4,   -40, 13,  20,  -20, 4,   12,  -14, 10,
  13,  -3,  -24, 1,   12,  -4,  -3,  -1,  14,  0,   8,   15,  -23, -13, 22,
  -4,  2,   -8,  -10, 6,   23,  4,   -24, -1,  2,   3,   -16, -12, 14,  -4,
  -2,  40,  28,  10,  -28, -19, 12,  4,   -10, -20, 4,   17,  20,  -4,  -24,
  -10, 4,   -20, 4,   -10, -6,  7,   27,  34,  5,   -23, 7,   1,   -10, 0,
  2,   -8,  5,   4,   22,  -13, -2,  34,  -14, -18, 22,  -18, 25,  -16, -18,
  15,  -2,  -2,  12,  -9,  2,   8,   -2,  -6,  22,  -6,  -24, 40,  -6,  12,
  -12, -18, 34,  4,   -40, 10,  -5,  -6,  -2,  -2,  -2,  2,   6,   -8,  36,
  -7,  -28, 0,   12,  10,  4,   -14, -3,  7,   10,  -2,  -20, -22, 6,   34,
  -28, -6,  16,  -8,  -12, 12,  12,  -8,  28,  16,  -16, -7,  21,  -10, -26,
  19,  -31, -11, 20,  3,   -12, 12,  14,  -16, -6,  -2,  4,   -4,  -14, 8,
  18,  -16, 30,  -6,  -25, 17,  14,  -20, -8,  19,  -14, 6,   22,  -6,  -14,
  11,  12,  -5,  -5,  -2,  -9,  -10, 13,  8,   -26, -18, 5,   1,   -4,  8,
  1,   -24, -3,  50,  38,  -16, 2,   32,  -32, -12, 36,  -28, 22,  -32, -25,
  24,  16,  -1,  -5,  2,   0,   28,  13,  -28, 0,   10,  -7,  26,  -26, -6,
  6,   -2,  14,  2,   -29, -10, 16,  3,   -15, -14, 1,   18,  12,  -8,  10,
  -1,  -6,  -6,  -3,  7,   8,   0,   8,   12,  3,   -6,  -8,  -8,  -9,  -2,
  7,   -6,  -10, 11,  21,  2,   -7,  2,   -13, 12,  8,   -2,  3,   -4,  -2,
  -1,  -4,  -12, -14, 0,   4,   6,   8,   -6,  9,   10,  14,  3,   -28, -10,
  24,  -6,  -12, -8,  3,   11,  8,   -8,  -12, 0,   -24, 23,  22,  -31, -18,
  14,  12,  14,  -46, 0,   46,  10,  -34, -22, 6,   16,  -5,  -11, 12,  30,
  -4,  -30, -16, 2,   -12, -17, 7,   22,  2,   -8,  2,   8,   10,  -8,  -4,
  2,   -4,  -2,  -2,  7,   -4,  16,  12,  -9,  12,  4,   -23, 12,  -20, -4,
  0,   -12, 4,   0,   -12, 14,  8,   8,   -2,  -1,  10,  0,   -16, 10,  -10,
  4,   10,  6,   6,   -18, -20, 34,  -13, -13, -18, 14,  30,  -25, -32, 22,
  24,  -8,  -23, 24,  20,  -22, -10, 10,  42,  -22, -32, 27,  15,  -10, -2,
  -6,  10,  1,   0,   10,  -2,  -3,  8,   -14, -5,  -14, -10, 0,   -6,  -4,
  15,  8,   12,  13,  10,  8,   4,   0,   -13, -20, 4,   -21, -4,  9,   -12,
  -1,  22,  16,  -2,  2,   -10, -7,  23,  6,   -28, 6,   -8,  47,  20,  -34,
  0,   13,  -12, 3,   -40, -36, -6,  17,  6,   -8,  4,   0,   46,  15,  -22,
  -10, -2,  12,  14,  -22, -16, 12,  10,  -5,  8,   7,   -7,  2,   -16, 4,
  -13, -26, 10,  -1,  -24, 18,  -14, 24,  36,  -6,  10,  19,  -16, 0,   -26,
  -17, -10, -17, 14,  10,  -20, 11,  0,   17,  4,   -20, -4,  14,  2,   -8,
  6,   -11, 7,   26,  -2,  -8,  10,  -8,  26,  -26, -36, -2,  10,  16,  10,
  -22, 4,   22,  12,  -29, -22, 24,  19,  -11, -18, 22,  1,   -12, 20,  2,
  -22, 14,  -18, -12, 2,   -9,  -14, 8,   11,  -7,  28,  16,  -2,  -2,  19,
  -4,  -28, 16,  -48, 7,   18,  -20, 0,   13,  -1,  3,   2,   4,   -14, -4,
  12,  -6,  -10, -2,  28,  -2,  0,   13,  -10, -9,  9,   8,   -18, -7,  17,
  6,   6,   4,   -18, 3,   9,   0,   -28, -4,  32,  -16, -35, 36,  4,   -2,
  10,  8,   -2,  0,   3,   -10, 10,  -20, -22, 2,   -7,  -10, 20,  6,   24,
  11,  16,  24,  -11, -12, 10,  -24, 14,  -44, -32, 22,  -2,  -7,  23,  2,
  26,  10,  8,   10,  -19, -11, 16,  -2,  17,  -24, -13, 32,  14,  -30, -26,
  11,  2,   -2,  -10, -5,  16,  16,  1,   11,  2,   10,  -7,  -6,  11,  -13,
  -22, 12,  26,  -9,  -6,  18,  0,   -5,  11,  8,   -26, 4,   5,   -25, -10,
  -2,  -16, -14, 30,  -1,  -16, 34,  22,  -8,  30,  18,  3,   -14, -2,  2,
  -32, -14, 6,   -36, 6,   0,   -6,  3,   14,  0,   -3,  17,  10,  -5,  4,
  20,  0,   -2,  27,  10,  12,  -16, -12, 0,   -24, -17, -12, -44, 8,   -4,
  5,   10,  8,   18,  16,  10,  13,  0,   -1,  9,   -2,  -12, -4,  -8,  -22,
  0,   2,   -7,  12,  22,  16,  8,   11,  10,  -4,  -5,  -8,  -28, -28, 2,
  -10, -13, 10,  14,  4,   34,  19,  -16, 11,  12,  -6,  -8,  1,   -10, -10,
  17,  -28, -4,  -13, -20, 0,   -12, -10, 0,   8,   38,  20,  6,   20,  34,
  10,  -41, -10, -23, -7,  -6,  -28, 0,   28,  11,  -2,  -2,  4,   -8,  -6,
  2,   -10, 0,   8,   -4,  6,   13,  10,  10,  9,   2,   2,   -6,  -18, -17,
  -20, -16, -2,  -4,  8,   9,   14,  32,  11,  -4,  22,  -6,  8,   -26, -28,
  9,   -1,  -9,  11,  -14, 22,  -8,  -2,  7,   -33, -6,  28,  -6,  36,  -22,
  -9,  49,  26,  -16, -20, 2,   0,   0,   -16, -27, 2,   29,  6,   -12, -12,
  12,  -7,  -5,  12,  -6,  0,   14,  14,  -10, -3,  10,  -15, -4,  9,   -27,
  4,   2,   0,   0,   11,  -2,  4,   28,  -6,  1,   5,   -2,  -2,  -3,  -18,
  -11, 24,  -14, -10, 10,  -6,  0,   6,   12,  -18, 11,  18,  -6,  17,  -6,
  -28, 30,  -12, 17,  -22, -24, 45,  -4,  -53, 3,   -20, 15,  10,  -14, -2,
  28,  20,  -20, -21, 20,  -4,  -8,  18,  -5,  -2,  7,   19,  -17, -10, 11,
  -24, -6,  14,  -14, 8,   2,   14,  7,   12,  10,  -16, 16,  -10, -12, -7,
  -19, -12, 9,   0,   -2,  36,  0,   -2,  34,  -8,  -21, 20,  -14, -18, -8,
  -4,  -4,  -6,  8,   19,  -18, 20,  -4,  -2,  16,  -12, -16, 21,  8,   28,
  -32, -1,  36,  -24, -14, 26,  -20, -29, 30,  -27, 2,   16,  -34, 30,  -16,
  -4,  11,  2,   6,   12,  0,   5,   -8,  13,  -30, 4,   -16, -24, 14,  -16,
  22,  32,  -8,  26,  25,  0,   9,   -12, -12, -14, -13, -20, -16, -8,  3,
  22,  0,   15,  19,  3,   24,  9,   -18, -5,  0,   -12, -16, -14, -13, -10,
  17,  12,  -14, 20,  2,   2,   10,  -4,  -10, 0,   10,  -14, 23,  -22, 17,
  12,  -30, 38,  -24, -17, 9,   -6,  -14, 6,   -2,  -11, 16,  24,  -20, 18,
  12,  -7,  19,  -12, -1,  6,   -12, -5,  -13, -15, 2,   2,   8,   -9,  22,
  11,  15,  20,  -16, -13, -1,  -12, -16, -15, -22, -4,  14,  12,  -4,  22,
  16,  10,  13,  11,  -20, -20, 26,  -30, 7,   -2,  -20, 18,  14,  -16, -8,
  -18, 16,  -10, -6,  16,  -12, 12,  -4,  -8,  24,  -28, 14,  16,  -44, 30,
  -12, -42, 32,  -9,  -16, 30,  0,   4,   -4,  20,  -2,  -12, 4,   -13, -16,
  0,   12,  0,   -9,  21,  7,   0,   24,  -13, -14, 10,  -10, -16, -7,  -5,
  -10, 10,  24,  -2,  6,   21,  15,  0,   -2,  -7,  -32, -1,  -10, -13, -2,
  4,   5,   7,   13,  2,   7,   -10, 8,   4,   -18, 14,  -10, -34, 30,  -16,
  -8,  28,  -18, 22,  -8,  -7,  23,  -26, 4,   8,   -40, 19,  -7,  -20, 8,
  9,   -6,  14,  21,  -6,  -6,  27,  -16, -8,  0,   -12, -10, -4,  26,  2,
  -8,  24,  7,   -2,  20,  -14, -30, 6,   -12, -18, -5,  -2,  -8,  18,  34,
  -2,  10,  8,   2,   2,   -12, -10, -12, 10,  -16, 16,  -10, -7,  20,  -23,
  14,  0,   6,   -7,  12,  -4,  -10, 20,  -19, -10, 4,   5,   -13, 4,   10,
  -24, 26,  36,  -44, 22,  8,   -29, 34,  -14, -6,  6,   3,   5,   -6,  -4,
  -4,  -10, 16,  -28, 14,  0,   -2,  9,   5,   6,   -12, 24,  -18, 0,   7,
  -20, -4,  1,   11,  -14, 8,   14,  -17, 14,  13,  -36, 15,  -12, 14,  -8,
  -2,  10,  -9,  6,   -4,  18,  -16, 4,   8,   -10, 2,   6,   -6,  -24, 22,
  -3,  -16, 18,  -8,  -8,  14,  -10, 18,  -26, 16,  14,  -28, 42,  -38, -28,
  37,  -16, -10, 18,  -28, 12,  11,  -11, 0,   7,   -6,  16,  18,  -22, 4,
  28,  -24, 2,   -4,  -22, 12,  1,   2,   -8,  8,   10,  -5,  3,   4,   -11,
  3,   -8,  9,   -3,  -4,  4,   -5,  -4,  -4,  14,  -15, 10,  4,   -4,  13,
  4,   8,   -6,  2,   2,   -12, -6,  -6,  -22, -6,  10,  -12, 2,   18,  7,
  20,  29,  10,  6,   -7,  15,  -26, -23, -8,  -53, 0,   17,  -31, 17,  26,
  14,  38,  24,  12,  -7,  15,  -12, -26, -17, -31, -15, -8,  -6,  4,   0,
  20,  11,  0,   19,  -10, -6,  7,   -4,  -1,  4,   -2,  2,   2,   16,  -18,
  14,  -1,  -14, 10,  -14, 0,   -4,  0,   5,   -4,  8,   13,  -2,  16,  10,
  -10, 2,   4,   -23, -6,  -6,  -24, 8,   -19, 22,  -2,  10,  38,  -11, 40,
  28,  -36, 20,  -15, -40, 7,   -37, -14, 4,   -3,  8,   18,  10,  11,  27,
  1,   -15, 18,  -18, -3,  2,   -23, 10,  -6,  6,   -10, 10,  -6,  -2,  8,
  -6,  3,   -6,  11,  -12, 6,   3,   -16, 14,  -9,  -8,  8,   0,   -6,  8,
  8,   -9,  12,  10,  -8,  -4,  8,   -12, -10, 10,  -18, -30, 32,  -9,  -15,
  33,  -8,  6,   17,  11,  -4,  -11, 23,  -22, -20, 32,  -40, -32, 36,  -20,
  -14, 32,  -9,  -4,  26,  4,   3,   -4,  12,  -8,  -10, 16,  -17, -11, 13,
  -8,  -2,  9,   -10, 7,   -2,  18,  -21, 16,  -4,  -8,  14,  -14, 5,   -12,
  17,  -10, 0,   8,   -12, 8,   -2,  -4,  6,   -6,  4,   1,   -1,  4,   -5,
  13,  -12, 6,   0,   -7,  5,   0,   4,   -25, 32,  -18, 0,   19,  -26, 23,
  -16, -16, 29,  -38, 24,  6,   -37, 46,  -18, -20, 26,  -9,  -12, 16,  -2,
  -20, 16,  -8,  12,  -10, 2,   8,   -14, 14,  -6,  16,  -22, 16,  -5,  -10,
  17,  -16, 8,   -16, 19,  -12, 4,   10,  -12, 12,  -8,  6,   -10, 4,   1,
  -6,  0,   -1,  0,   5,   -8,  10,  -4,  2,   20,  -21, 16,  2,   1,   -12,
  11,  -12, -10, 9,   -18, -8,  0,   8,   -10, 10,  16,  -18, 24,  34,  -50,
  40,  -10, -26, 36,  -36, 8,   -1,  3,   -8,  14,  -18, 17,  -11, 5,   -16,
  22,  -22, 13,  2,   -12, 14,  -8,  22,  -28, 24,  -4,  -14, 26,  -25, 16,
  -24, 31,  -28, 10,  10,  -25, 26,  -18, 18,  -20, 16,  -4,  -10, 17,  -18,
  16,  -5,  2,   -3,  7,   -6,  10,  -10, 0,   -8,  14,  -18, 10,  0,   -12,
  15,  -6,  10,  -18, 20,  -6,  -10, 22,  -26, 12,  20,  -32, 40,  -42, 38,
  -28, 18,  -6,  13,  -24, 32,  -40, 40,  -34, 23,  -11, 16,  -22, 23,  -17,
  11,  0,   -1,  2,   -6,  8,   -7,  0,   4,   -5,  4,   -2,  4,   -6,  5,
  -4,  -2,  3,   -2,  2,   -2,  -1,  2,   -4,  0,   0,   0,   0,   -1,  2,
  0,   0,   0,   -4,  4,   0,   2,   -5,  5,   -1,  -2,  6,   -6,  2,   -11,
  18,  -24, 26,  -26, 20,  -13, 6,   4,   -8,  10,  -12, 12,  -10, 6,   -3,
  16,  -28, 38,  -43, 42,  -34, 22,  -10, 14,  -22, 26,  -28, 28,  -22, 18,
  -7,  4,   -4,  4,   -2,  0,   6,   -6,  5,   -8,  11,  -14, 5,   -1,  -7,
  8,   -6,  4,   -5,  8,   -3,  -2,  6,   -5,  6,   -4,  5,   -4,  2,   1,
  -8,  8,   -4,  0,   0,   -2,  2,   -4,  5,   -4,  2,   0,   2,   -2,  2,
  -2,  0,   0,   0,   0,   -4,  6,   -11, 14,  -12, 10,  -6,  16,  -21, 22,
  -14, 4,   3,   -6,  7,   -10, 9,   -6,  -8,  24,  -32, 30,  -20, 24,  -34,
  34,  -21, -4,  20,  -24, 21,  -20, 29,  -28, 16,  6,   -24, 26,  -20, 12,
  -18, 14,  -5,  -12, 23,  -25, 16,  8,   -14, 18,  -20, 20,  -16, 10,  -4,
  -10, 15,  -19, 18,  -18, 15,  -10, 4,   -3,  8,   -9,  12,  -12, 10,  -8,
  4,   8,   -20, 28,  -36, 38,  -33, 24,  -13, 24,  -35, 40,  -37, 28,  -18,
  10,  -2,  -6,  7,   -5,  -1,  6,   -8,  4,   0,   3,   -4,  2,   2,   -6,
  8,   -8,  4,   -2,  2,   -2,  0,   2,   -5,  5,   -2,  4,   -8,  12,  -14,
  14,  -12, 7,   -4,  -4,  6,   -8,  10,  -10, 10,  -4,  2,   -1,  3,   -2,
  2,   2,   -4,  4,   -2,  8,   -14, 16,  -18, 11,  -6,  4,   -1,  -10, 22,
  -25, 26,  -20, 16,  -12, 4,   -12, 22,  -36, 42,  -46, 45,  -32, 17,  -9,
  21,  -25, 24,  -20, 10,  -6,  -4,  -4,  4,   -2,  2,   2,   0,   2,   -1,
  -6,  9,   -12, 12,  -11, 9,   -4,  2,   6,   -12, 14,  -17, 16,  -12, 8,
  -4,  -2,  6,   -7,  8,   -6,  4,   -1,  0,   -4,  4,   -7,  6,   -8,  7,
  -6,  5,   8,   -12, 18,  -16, 16,  -12, 6,   -4,  0,   0,   -1,  -2,  0,
  0,   0,   -1,  -9,  20,  -29, 36,  -44, 43,  -34, 16,  -12, 24,  -32, 37,
  -34, 24,  -13, 1,   -8,  12,  -16, 18,  -18, 14,  -10, 4,   12,  -20, 26,
  -28, 26,  -22, 14,  -7,  -8,  14,  -17, 20,  -18, 14,  -8,  5,   0,   -2,
  0,   -1,  -2,  2,   -4,  2,   8,   -10, 17,  -18, 22,  -19, 14,  -8,  -9,
  12,  -19, 19,  -21, 20,  -14, 10,  -2,  6,   -4,  4,   0,   -2,  0,   -4,
  11,  -22, 30,  -36, 37,  -32, 24,  -8,  -3,  6,   -9,  10,  -10, 9,   -6,
  3,   6,   -12, 18,  -22, 22,  -18, 12,  -6,  -9,  18,  -25, 30,  -30, 24,
  -16, 8,   8,   -18, 24,  -27, 26,  -22, 14,  -8,  -4,  12,  -14, 16,  -14,
  11,  -5,  3,   0,   -2,  -1,  1,   -2,  4,   -4,  2,   7,   -12, 20,  -25,
  26,  -25, 18,  -8,  -6,  14,  -22, 27,  -28, 26,  -18, 8,   0,   0,   0,
  0,   2,   -2,  2,   -1,  -1,  2,   -3,  4,   -6,  6,   -6,  3,   3,   -6,
  10,  -12, 14,  -13, 10,  -6,  -6,  10,  -16, 20,  -20, 19,  -13, 7,   8,
  -16, 22,  -28, 28,  -24, 16,  -8,  -11, 21,  -29, 32,  -31, 27,  -18, 8,
  10,  -18, 26,  -30, 28,  -24, 15,  -8,  -8,  15,  -20, 23,  -22, 18,  -12,
  6
};

static const int32_t mdt8x8_mode8[4096] = {
  0,   0,   2,   2,   3,   4,   4,   7,   2,   2,   4,   5,   7,   8,   10,
  14,  4,   4,   5,   8,   10,  14,  16,  18,  4,   5,   8,   10,  14,  18,
  20,  20,  5,   8,   11,  14,  19,  23,  23,  22,  7,   10,  14,  18,  24,
  26,  26,  24,  10,  14,  18,  22,  26,  28,  27,  24,  12,  16,  20,  23,
  26,  27,  26,  24,  2,   3,   4,   5,   4,   6,   4,   -4,  4,   7,   8,
  10,  12,  10,  1,   -8,  6,   10,  12,  16,  18,  8,   -5,  -14, 10,  15,
  18,  22,  17,  2,   -12, -18, 15,  21,  26,  24,  12,  -6,  -17, -20, 20,
  28,  29,  20,  3,   -11, -21, -22, 26,  31,  25,  11,  -4,  -14, -22, -21,
  28,  28,  17,  4,   -8,  -16, -21, -18, 2,   4,   4,   6,   5,   -3,  -6,
  -2,  5,   9,   11,  12,  4,   -12, -10, 3,   8,   14,  17,  12,  -8,  -22,
  -8,  10,  13,  22,  20,  1,   -24, -24, -1,  15,  20,  28,  14,  -16, -30,
  -16, 8,   19,  28,  28,  0,   -27, -26, -4,  14,  18,  29,  16,  -15, -28,
  -16, 6,   17,  16,  22,  1,   -22, -23, -8,  10,  16,  14,  2,   4,   6,
  6,   2,   -2,  3,   8,   5,   10,  14,  8,   -4,  -3,  12,  13,  8,   18,
  18,  -2,  -14, 6,   22,  8,   15,  25,  10,  -18, -10, 22,  22,  -5,  24,
  23,  -8,  -24, 7,   32,  12,  -16, 25,  4,   -26, -13, 22,  26,  -4,  -24,
  10,  -18, -26, 3,   22,  7,   -18, -26, -7,  -26, -14, 12,  11,  -9,  -23,
  -23, 3,   8,   12,  5,   -8,  -2,  4,   0,   9,   20,  18,  -6,  -15, 4,
  5,   -9,  19,  30,  6,   -24, -6,  14,  -6,  -16, 32,  24,  -18, -24, 14,
  8,   -22, -10, 34,  2,   -30, -2,  22,  -12, -24, 5,   18,  -16, -16, 16,
  6,   -25, -8,  22,  -1,  -16, 5,   16,  -12, -20, 10,  30,  -5,  -3,  14,
  6,   -12, -4,  20,  27,  7,   8,   6,   8,   7,   8,   14,  18,  12,  9,
  6,   9,   11,  18,  28,  28,  12,  5,   2,   8,   18,  24,  28,  28,  6,
  0,   1,   16,  25,  18,  18,  22,  -2,  -4,  8,   24,  16,  2,   9,   15,
  -9,  -8,  10,  8,   -14, -11, 6,   6,   -16, -12, -6,  -25, -38, -14, 2,
  -4,  -15, -14, -22, -40, -35, -11, -4,  -10, -2,  -6,  -2,  -6,  -20, -12,
  13,  12,  -9,  -10, -4,  -22, -36, -2,  26,  12,  -15, -8,  -9,  -36, -26,
  20,  26,  4,   -14, -6,  -17, -28, 0,   26,  12,  -3,  -10, -6,  -14, -10,
  7,   7,   -4,  -4,  3,   12,  2,   -10, -9,  -8,  -4,  0,   30,  35,  4,
  -17, -12, -3,  2,   0,   46,  33,  -8,  -14, -1,  4,   -2,  -6,  2,   13,
  6,   -2,  0,   -4,  -13, 1,   14,  24,  4,   -6,  -2,  -18, -18, 14,  30,
  22,  -10, -10, -10, -26, 0,   30,  34,  -1,  -25, -8,  -15, -18, 22,  26,
  12,  -24, -18, 0,   -16, -4,  23,  7,   -14, -16, 10,  6,   -10, 4,   5,
  -12, -14, 16,  30,  6,   -2,  5,   -12, -22, 2,   33,  28,  0,   -1,  -1,
  -18, -20, 3,   -4,  -6,  12,  12,  -18, -14, 9,   2,   -14, 2,   26,  -4,
  -34, 0,   21,  -10, -14, 24,  20,  -32, -22, 21,  16,  -16, 2,   26,  -7,
  -26, 11,  16,  -1,  -14, 10,  7,   -14, 6,   16,  -10, -5,  -10, 0,   1,
  8,   12,  -14, -22, 10,  -12, -2,  18,  18,  -12, -34, -6,  22,  -10, 12,
  28,  6,   -26, -24, 10,  19,  8,   25,  4,   -12, 6,   0,   1,   6,   30,
  30,  -16, -8,  13,  -2,  8,   8,   44,  2,   -28, 11,  6,   2,   16,  -6,
  22,  -26, -7,  16,  -11, 10,  8,   -26, -14, -18, 16,  -7,  -14, 14,  -14,
  -26, -15, 6,   6,   -22, 5,   4,   -26, 2,   6,   12,  -16, -8,  20,  -10,
  -10, 30,  10,  -1,  -20, 6,   11,  -12, 10,  33,  0,   -1,  14,  26,  6,
  -6,  7,   -2,  -2,  4,   32,  30,  -2,  4,   12,  -12, -2,  17,  34,  10,
  -6,  16,  6,   -20, 2,   15,  14,  -2,  0,   12,  -4,  -24, -8,  -12, -2,
  -4,  -8,  3,   -8,  -23, -34, -24, 2,   -19, -21, 6,   -2,  -17, -36, 6,
  8,   -28, -6,  25,  8,   -4,  -4,  32,  4,   -10, 26,  32,  13,  8,   22,
  12,  -5,  7,   -2,  -18, -8,  -12, 38,  6,   -7,  6,   -20, -22, -12, -29,
  26,  -6,  0,   -12, -32, -7,  -13, -30, -1,  -7,  4,   -16, -8,  9,   -12,
  -10, -14, 6,   16,  12,  26,  19,  3,   8,   -8,  13,  26,  28,  25,  23,
  22,  6,   -6,  2,   4,   -4,  -6,  14,  17,  -10, -6,  -10, -22, -32, -16,
  6,   -2,  -17, 28,  16,  -12, 8,   16,  4,   16,  3,   46,  3,   -11, 24,
  12,  8,   21,  -2,  24,  -19, 6,   18,  -4,  12,  8,   -4,  -14, -17, 8,
  -9,  -5,  0,   -10, 10,  -20, -3,  -16, -18, -3,  -25, -10, 20,  4,   -5,
  -28, -2,  -12, -31, 6,   6,   20,  -8,  -6,  18,  -6,  -2,  12,  -22, 17,
  0,   19,  26,  16,  24,  -2,  -32, -3,  -6,  0,   -2,  -12, -16, 10,  31,
  -2,  -4,  -2,  -5,  -18, -16, 28,  38,  4,   -2,  -8,  -6,  -13, -5,  20,
  12,  7,   0,   -2,  0,   -12, -17, -16, -12, 11,  10,  17,  10,  -17, -34,
  -32, -9,  10,  16,  33,  18,  -8,  -14, -12, -1,  -10, -2,  19,  14,  16,
  24,  4,   -6,  -36, -28, -10, -2,  24,  27,  2,   -9,  14,  0,   -30, -16,
  -1,  -11, -10, -4,  18,  -19, -40, -14, -6,  -12, -6,  -4,  4,   -24, -17,
  3,   0,   -2,  8,   -2,  13,  4,   8,   15,  12,  10,  16,  -10, 36,  18,
  4,   14,  5,   11,  11,  -29, 28,  -13, -13, -4,  -23, 0,   0,   -30, -2,
  -23, 1,   -16, -30, 6,   6,   -8,  -8,  14,  28,  -7,  2,   28,  22,  18,
  4,   0,   -8,  -10, -1,  21,  25,  6,   6,   1,   -10, -10, 9,   34,  28,
  -6,  0,   -4,  -1,  0,   2,   18,  7,   -22, -4,  -3,  2,   -12, -28, -8,
  -6,  -20, 6,   4,   -4,  -30, -32, 4,   12,  -7,  15,  12,  6,   -12, -5,
  28,  28,  6,   -7,  12,  31,  8,   -6,  8,   12,  11,  -37, 8,   32,  -10,
  -34, -28, -12, 0,   -13, -4,  6,   6,   17,  14,  -9,  11,  -11, -2,  4,
  19,  31,  -1,  -10, 28,  -1,  -2,  -6,  14,  16,  -19, -2,  16,  0,   -12,
  -22, -11, -2,  -12, -12, -22, -6,  -14, -30, -12, 16,  4,   -23, -36, 8,
  -2,  -14, 14,  26,  16,  0,   -18, 24,  4,   4,   6,   -7,  22,  32,  -4,
  16,  -4,  -2,  -30, -33, 20,  22,  -8,  -3,  -21, -28, 6,   25,  -20, -7,
  16,  -14, -30, -20, 25,  22,  -20, 4,   1,   -3,  -12, -6,  22,  3,   6,
  4,   -24, 32,  0,   -16, 4,   0,   17,  -6,  -18, 38,  -18, -18, -2,  -1,
  4,   -2,  20,  6,   -17, 4,   -2,  -2,  -2,  10,  38,  -5,  8,   7,   -6,
  12,  1,   -3,  14,  8,   13,  -24, -10, 18,  -16, -32, -18, 14,  1,   11,
  18,  -27, -26, 12,  24,  14,  -3,  20,  19,  -30, -26, 8,   21,  2,   -8,
  7,   12,  13,  -14, -22, 2,   -9,  -16, -9,  15,  34,  -10, -24, -8,  -8,
  -14, -10, 7,   0,   6,   17,  -16, 10,  -2,  -5,  -8,  -24, 24,  34,  -12,
  20,  -4,  2,   2,   -10, 0,   0,   10,  5,   -14, 10,  18,  3,   -28, -24,
  24,  18,  -8,  -11, 12,  7,   19,  22,  -12, 16,  -22, 0,   10,  -8,  26,
  25,  -12, -2,  -15, 16,  -2,  -26, -6,  10,  10,  2,   -4,  2,   2,   -22,
  -40, 2,   21,  17,  -16, -9,  25,  -1,  -20, 1,   -5,  9,   -26, 2,   26,
  19,  17,  -11, -22, 4,   -12, -6,  -3,  16,  8,   -18, 6,   24,  10,  -20,
  -14, 6,   -18, -3,  38,  22,  12,  -16, -12, 16,  10,  6,   20,  23,  5,
  -19, -12, 12,  0,   -1,  30,  -10, 6,   0,   -12, 4,   -12, -24, 20,  -22,
  23,  1,   -10, 18,  -12, -37, 8,   -2,  28,  -12, -6,  30,  3,   -20, 8,
  -6,  13,  -14, -17, 17,  12,  -7,  6,   -26, 17,  -4,  -27, 7,   4,   -16,
  5,   -18, 34,  0,   -8,  20,  -4,  -18, 10,  -18, 2,   2,   -26, -25, 6,
  23,  -2,  -18, 4,   0,   -16, -28, -3,  28,  1,   9,   -6,  5,   26,  -18,
  -24, 4,   0,   28,  -8,  22,  39,  -2,  -18, -21, 0,   14,  -6,  11,  4,
  21,  7,   -18, 10,  -17, -12, -22, -22, 22,  10,  6,   13,  -13, -2,  -16,
  -5,  -1,  -2,  22,  -8,  14,  16,  10,  9,   -18, -3,  10,  -34, -2,  -8,
  6,   14,  -28, -12, 6,   -24, 6,   -24, 4,   24,  -18, 0,   -1,  -20, 17,
  -30, -7,  19,  22,  16,  -9,  20,  19,  -16, -13, -10, 22,  12,  -8,  40,
  14,  8,   -9,  -38, -2,  2,   -16, 12,  2,   23,  6,   -22, 10,  3,   -25,
  -17, -15, 19,  12,  4,   17,  4,   -8,  -10, -18, 2,   -8,  -10, -14, -2,
  20,  8,   -12, -22, -16, 12,  -1,  -18, -2,  22,  -2,  -20, -22, 2,   6,
  2,   0,   16,  23,  6,   -14, -18, 15,  22,  -9,  0,   24,  32,  10,  -23,
  -4,  -3,  -15, 3,   -15, 24,  26,  -8,  -16, -17, 4,   0,   -44, -6,  1,
  7,   4,   6,   18,  -18, -11, -17, -22, 15,  4,   3,   10,  -13, 37,  6,
  5,   13,  -23, -16, 4,   15,  -30, 9,   25,  24,  27,  10,  26,  26,  -22,
  3,   6,   20,  16,  4,   17,  2,   4,   -22, -29, -10, -22, -12, -20, -20,
  11,  -24, -20, -18, -17, -4,  -14, 4,   10,  8,   17,  8,   16,  20,  17,
  20,  9,   14,  11,  -4,  0,   2,   -3,  -9,  -2,  -8,  -10, -17, -22, -18,
  -20, -19, -6,  5,   16,  16,  10,  14,  17,  14,  -20, 14,  18,  0,   -5,
  -39, -16, 19,  -6,  22,  0,   -3,  1,   -18, 2,   -2,  1,   0,   -7,  6,
  10,  24,  12,  -28, -20, -10, 9,   14,  -2,  -2,  4,   2,   -10, 2,   -2,
  8,   -8,  -28, 2,   32,  20,  -12, -26, 3,   24,  10,  -16, 4,   14,  -15,
  -8,  -10, 22,  29,  -26, -13, -7,  25,  24,  -34, -20, 0,   -4,  16,  -23,
  18,  18,  -26, -26, 17,  22,  -8,  -8,  6,   -1,  2,   -3,  -5,  10,  -2,
  8,   -18, -7,  29,  14,  -20, -6,  2,   -2,  7,   6,   -16, 0,   7,   0,
  -8,  -7,  32,  -4,  -26, -6,  9,   16,  -8,  -10, -8,  -2,  35,  -6,  -19,
  13,  6,   -8,  -25, 7,   22,  -2,  -8,  -16, 13,  17,  14,  -12, -41, 24,
  20,  -32, 13,  -39, -2,  -3,  0,   18,  13,  -28, -32, -17, 1,   -4,  6,
  -2,  4,   -3,  -8,  28,  -10, 2,   -2,  -22, 7,   34,  12,  16,  -12, 4,
  -7,  10,  0,   -4,  4,   -16, 10,  -4,  5,   30,  -24, -22, -5,  -6,  20,
  -11, -5,  -11, 3,   22,  -4,  8,   5,   0,   -14, -18, 26,  8,   6,   -12,
  -11, 18,  7,   14,  -14, -46, 26,  -17, -38, -22, -16, -4,  10,  17,  16,
  1,   -18, -14, -8,  0,   2,   4,   -2,  32,  30,  14,  5,   -4,  -11, -18,
  -10, 9,   19,  18,  2,   2,   7,   -8,  12,  -34, -25, -2,  -7,  8,   24,
  0,   20,  0,   -16, 0,   -5,  -8,  6,   -26, 0,   40,  6,   24,  -2,  -14,
  8,   -28, -4,  -14, -24, 8,   -15, 4,   20,  2,   13,  -3,  -3,  -20, 8,
  12,  -18, 26,  -18, -12, 14,  -20, 16,  3,   -27, 42,  -30, -8,  36,  -22,
  14,  6,   -27, 26,  -15, -10, 28,  -30, 10,  16,  -19, 14,  5,   -19, 16,
  -24, 6,   6,   -6,  16,  -4,  -10, 20,  -8,  4,   0,   -6,  6,   -15, -3,
  18,  -5,  8,   5,   -10, 6,   -6,  -13, -2,  -8,  2,   -3,  -6,  16,  6,
  0,   -38, 15,  36,  -20, 10,  10,  -13, 16,  -30, 8,   12,  -6,  8,   -4,
  3,   27,  0,   -18, -20, 12,  -14, 0,   6,   2,   4,   -3,  -2,  0,   -12,
  18,  -20, -12, 2,   14,  20,  -4,  -3,  12,  -19, 9,   8,   -26, 4,   16,
  -14, 0,   28,  3,   10,  -30, -16, 15,  -10, -6,  24,  -25, 20,  26,  -12,
  2,   14,  -11, -26, -11, -2,  5,   2,   10,  -8,  4,   -28, -2,  9,   -2,
  8,   6,   -14, 16,  -14, 1,   16,  -24, -2,  2,   -1,  0,   30,  -22, 11,
  -8,  -12, -1,  17,  -30, 22,  -10, -6,  31,  -2,  -17, 22,  -34, -6,  30,
  -38, 22,  2,   -15, 15,  -1,  2,   20,  -32, -6,  -8,  6,   1,   20,  8,
  -8,  27,  6,   0,   11,  -23, 2,   -19, 24,  -4,  27,  6,   -4,  12,  -8,
  -2,  14,  -18, 13,  -4,  2,   2,   0,   -6,  -7,  -10, -22, 2,   4,   -18,
  28,  -16, -2,  23,  -30, 10,  8,   -18, 16,  -7,  -5,  32,  -6,  -8,  5,
  6,   -20, 19,  -19, -4,  18,  -20, -8,  28,  -29, 25,  3,   -32, 21,  -7,
  -16, 25,  -12, 6,   31,  -18, 18,  8,   -6,  0,   -8,  -8,  20,  13,  -8,
  42,  10,  -12, 36,  -8,  -17, 22,  -20, -1,  6,   -10, 4,   -14, -32, 8,
  -14, -22, -1,  -2,  -19, 15,  16,  -12, 20,  10,  -4,  14,  0,   17,  14,
  -9,  16,  -5,  1,   2,   -8,  -12, -18, 3,   -14, -12, 6,   -6,  -10, 2,
  2,   0,   8,   12,  -2,  22,  -2,  26,  16,  -27, 22,  -16, -17, 26,  -38,
  2,   23,  -10, -28, -28, -28, 2,   -6,  -29, -4,  10,  6,   20,  2,   -10,
  12,  8,   -17, 23,  8,   20,  22,  4,   12,  9,   2,   -16, -18, -29, -17,
  6,   -17, -13, 10,  -18, 10,  4,   -9,  0,   -4,  10,  -4,  16,  16,  17,
  20,  8,   6,   14,  -6,  -2,  -28, -32, -15, -4,  -27, -14, 12,  -14, 31,
  13,  -8,  22,  -6,  16,  -27, 40,  -25, -11, 12,  -18, 14,  -20, -10, 0,
  -4,  14,  -6,  4,   6,   6,   14,  -20, 18,  -3,  -10, 18,  -24, 24,  1,
  13,  -6,  -10, 10,  -6,  -5,  -14, -12, 16,  -16, 20,  -6,  -11, 29,  -21,
  -4,  -5,  10,  -3,  -4,  8,   -14, 22,  4,   -8,  14,  -24, 15,  13,  -29,
  26,  10,  -17, 7,   12,  -16, -2,  24,  -32, -12, -4,  -2,  2,   -34, -51,
  4,   24,  -2,  10,  -10, -1,  23,  20,  -9,  -21, 6,   4,   7,   6,   16,
  19,  2,   1,   -4,  -6,  4,   -5,  -30, -32, 14,  26,  -4,  6,   -14, 0,
  15,  4,   -11, -16, 4,   8,   1,   8,   16,  20,  -10, -4,  -5,  -5,  8,
  -14, -40, -20, 14,  28,  2,   0,   -6,  12,  30,  4,   -11, -18, -1,  9,
  19,  -20, -26, 20,  48,  6,   5,   -9,  -10, 16,  18,  -30, -20, -1,  -2,
  -4,  -4,  2,   8,   -8,  -14, -7,  -2,  12,  10,  -18, -18, 30,  30,  0,
  3,   -2,  -6,  21,  5,   -20, -8,  4,   0,   -8,  -4,  9,   6,   -16, -12,
  -5,  0,   12,  4,   -31, -3,  36,  28,  -8,  -6,  -6,  -1,  24,  0,   -36,
  0,   7,   34,  43,  14,  -18, 0,   -4,  -18, 14,  -22, -20, 8,   8,   -2,
  3,   4,   -11, -19, -26, -9,  6,   5,   2,   12,  -8,  34,  31,  2,   -18,
  2,   -12, -6,  17,  -11, -6,  16,  0,   0,   1,   -4,  -4,  -22, -24, -7,
  12,  1,   4,   8,   -10, 42,  34,  -15, -7,  4,   -14, -2,  12,  -33, -6,
  10,  -4,  4,   7,   0,   -6,  -8,  9,   44,  20,  -14, -14, -15, -39, 10,
  -15, -28, -5,  16,  -2,  18,  14,  -1,  0,   -22, -6,  7,   8,   8,   18,
  -13, 23,  29,  7,   -22, -3,  -26, -20, 10,  -12, -11, 6,   4,   7,   8,
  6,   3,   -17, -14, -4,  8,   2,   18,  12,  -4,  26,  30,  -2,  -14, -10,
  -18, -24, 5,   -19, -19, 12,  1,   6,   7,   12,  -24, 30,  -23, 28,  -16,
  22,  -8,  10,  -4,  12,  -30, 23,  -22, 10,  -7,  4,   0,   1,   2,   -18,
  25,  -28, 22,  -18, -10, -4,  33,  -34, 34,  -20, 16,  -5,  12,  -22, 14,
  -10, -6,  4,   -14, 11,  12,  -8,  -4,  13,  -17, 24,  -14, 14,  -16, 13,
  -5,  4,   -6,  0,   -4,  -4,  8,   -2,  -5,  4,   4,   -6,  10,  -6,  26,
  12,  -26, 32,  -16, -7,  20,  -28, -29, 12,  -5,  -3,  -6,  13,  -20, 26,
  -5,  -2,  2,   0,   0,   10,  -10, 11,  26,  -6,  -6,  14,  -10, -6,  17,
  -32, -24, 14,  -2,  -13, 11,  -5,  -3,  14,  -2,  -7,  6,   0,   2,   6,
  -6,  20,  30,  -16, -1,  12,  -20, 2,   4,   -34, -25, 28,  -14, -4,  20,
  -17, 10,  13,  -8,  10,  -8,  -8,  -6,  -5,  -1,  5,   4,   -2,  1,   24,
  -18, 26,  -14, 4,   0,   13,  -30, 29,  -24, 10,  -11, 0,   -24, 26,  -20,
  2,   2,   -10, 14,  -5,  2,   -14, 28,  -16, 22,  -12, 12,  -6,  20,  -24,
  16,  -22, 13,  -15, -3,  0,   -8,  12,  -11, 18,  -16, 20,  -2,  8,   -6,
  12,  -22, 28,  -31, 26,  -29, 11,  -3,  2,   0,   -8,  -2,  -11, -4,  -1,
  4,   -4,  10,  -2,  10,  6,   11,  -6,  2,   -9,  6,   -4,  -3,  -5,  -8,
  8,   3,   -2,  -8,  9,   -14, 14,  -10, 4,   0,   10,  -14, 27,  -23, 28,
  -14, 4,   -6,  16,  -28, 32,  -38, 19,  -24, 16,  -8,  22,  -35, 39,  -28,
  37,  -12, 0,   -12, 19,  -20, 20,  -22, 6,   -6,  2,   -24, 32,  -14, 22,
  1,   6,   17,  14,  4,   -14, -6,  -4,  -24, 12,  -32, -4,  6,   -3,  4,
  14,  -6,  9,   4,   5,   -12, 29,  -28, 28,  -16, 12,  0,   4,   -4,  0,
  -20, 18,  -34, 24,  -36, 6,   2,   5,   2,   7,   7,   4,   14,  5,   -6,
  6,   -6,  -14, 16,  -30, 16,  -22, 8,   -16, 20,  -8,  -2,  16,  -18, 18,
  -2,  2,   -22, -3,  -35, -30, -20, -10, 1,   12,  12,  16,  27,  43,  16,
  14,  0,   -8,  -2,  -10, -8,  -28, -4,  -8,  -6,  -2,  -8,  -7,  -8,  -6,
  -3,  -6,  6,   10,  8,   16,  16,  34,  4,   16,  -6,  -9,  -6,  -12, -22,
  -38, -10, -12, 2,   4,   10,  -6,  38,  10,  28,  -8,  5,   -15, 14,  -16,
  -3,  -13, -10, 10,  26,  4,   16,  18,  -6,  18,  -38, 10,  -25, -3,  -33,
  10,  -36, 28,  8,   10,  1,   29,  -24, 36,  -16, 3,   -18, -6,  4,   0,
  6,   6,   -11, 18,  -14, 10,  -11, -2,  -17, 2,   -10, 4,   15,  -1,  4,
  26,  -10, 24,  0,   -13, -14, -10, -8,  -15, 5,   -20, -2,  20,  4,   16,
  8,   0,   6,   0,   13,  -20, 10,  -15, -18, -26, 20,  6,   -25, 6,   7,
  15,  29,  28,  -38, 12,  10,  12,  -26, -10, -32, 4,   1,   22,  -36, 10,
  10,  12,  2,   -3,  -5,  -2,  5,   2,   -6,  0,   18,  7,   -8,  -1,  18,
  -8,  -4,  -12, -28, -6,  14,  4,   -32, 10,  16,  13,  23,  6,   -21, 6,
  20,  -2,  -24, -4,  -10, -2,  13,  -11, -2,  -6,  21,  -6,  -6,  2,   19,
  27,  18,  -26, 1,   -1,  6,   -6,  -16, -56, 6,   12,  18,  -8,  2,   -12,
  30,  18,  10,  -28, -6,  4,   4,   4,   3,   -8,  16,  -2,  8,   -4,  0,
  -12, -12, -34, 2,   6,   6,   -4,  4,   -5,  40,  25,  5,   -24, -3,  6,
  4,   4,   -32, -26, 4,   20,  6,   -8,  -5,  2,   10,  20,  -13, 0,   -8,
  8,   9,   36,  26,  -14, -20, -6,  8,   -8,  -13, -46, -28, 11,  30,  -4,
  -2,  6,   6,   25,  26,  -17, -13, 0,   6,   -5,  7,   2,   0,   0,   5,
  -5,  1,   0,   -12, -32, -8,  7,   15,  -2,  -2,  3,   15,  36,  22,  -24,
  -16, 4,   2,   -6,  -10, -32, -20, 26,  14,  -6,  1,   4,   2,   16,  7,
  -13, -6,  8,   -6,  0,   32,  0,   -6,  -6,  0,   -14, 12,  35,  -32, -5,
  18,  -6,  13,  16,  -18, -40, 20,  2,   -14, 3,   -6,  -16, 19,  26,  -1,
  -3,  10,  -7,  4,   4,   -4,  -2,  -15, -4,  9,   -5,  11,  2,   -12, -24,
  24,  4,   -16, 4,   -11, -12, 31,  30,  -23, -2,  15,  -6,  12,  14,  -30,
  -26, 14,  -3,  -4,  0,   -6,  -10, 20,  9,   -1,  1,   10,  -20, 30,  -28,
  20,  -18, 8,   -16, 15,  -8,  -4,  7,   -5,  13,  0,   8,   -16, 18,  -14,
  17,  -17, 6,   -10, 8,   -4,  -4,  8,   -14, 16,  -14, 11,  -20, 22,  -18,
  11,  -6,  2,   7,   2,   9,   -18, 19,  -16, 17,  -18, 5,   -20, 23,  -18,
  14,  -10, 0,   13,  -8,  16,  -27, 32,  -35, 34,  -26, 12,  -2,  -20, 10,
  6,   -22, 18,  -9,  -16, 22,  28,  -14, -2,  25,  -24, 15,  20,  -32, -24,
  13,  -4,  -15, 16,  -9,  -16, 26,  8,   -4,  8,   -4,  4,   -4,  10,  -9,
  12,  -10, -1,  8,   -12, 4,   7,   -20, -24, 21,  1,   -17, 24,  -14, -10,
  34,  24,  -23, 8,   5,   -13, 6,   16,  -34, -10, 9,   -1,  -6,  12,  -10,
  -5,  16,  18,  -24, 32,  -29, 24,  -20, 22,  -14, -12, 11,  -19, 19,  -10,
  11,  -18, 14,  -2,  6,   -4,  1,   -18, 14,  2,   -4,  12,  -20, 18,  -17,
  36,  -31, 10,  -6,  -8,  13,  -8,  7,   -26, 24,  -10, 6,   3,   0,   -10,
  16,  -6,  5,   -8,  3,   0,   -6,  16,  -22, 18,  -18, 18,  -8,  -2,  6,
  -13, 20,  -22, 21,  -21, 10,  18,  -22, 11,  2,   -10, 10,  -21, 12,  -20,
  34,  -18, 0,   8,   -3,  28,  -16, 12,  -32, 11,  10,  -12, -6,  -26, 16,
  4,   22,  -4,  -16, 9,   18,  11,  -8,  -18, -2,  -6,  24,  -8,  -26, 8,
  -5,  22,  -10, 10,  -24, 4,   30,  -24, 16,  -18, 13,  -10, 16,  0,   -25,
  26,  -18, 8,   -10, 8,   -11, 4,   9,   -14, 10,  9,   4,   1,   -8,  -8,
  26,  -16, 9,   -17, -5,  -7,  24,  2,   -30, 14,  -7,  18,  11,  4,   -33,
  0,   36,  -12, -1,  -14, -17, 3,   38,  -7,  -30, 4,   11,  4,   24,  -14,
  -32, 12,  21,  6,   -20, 4,   -26, 22,  17,  -8,  -14, -10, 22,  -6,  22,
  -22, -6,  4,   6,   10,  -16, 4,   -12, 14,  -2,  1,   -4,  -4,  8,   -4,
  8,   8,   12,  -12, 11,  4,   10,  4,   -8,  -24, -12, 13,  -13, -15, -14,
  -8,  10,  40,  8,   -13, 10,  28,  12,  8,   -14, -44, -8,  20,  -14, -32,
  -9,  -8,  12,  43,  3,   -20, 13,  32,  4,   8,   -12, -28, -2,  20,  -16,
  -23, 0,   -6,  10,  14,  4,   -16, 13,  14,  -2,  3,   -6,  -4,  -2,  10,
  -10, -2,  0,   12,  1,   8,   8,   20,  6,   6,   10,  -19, -7,  -9,  -18,
  -32, -11, -8,  -17, 24,  12,  7,   26,  40,  14,  6,   20,  -25, -16, 1,
  -34, -35, -16, -4,  -21, 23,  12,  -3,  29,  32,  10,  7,   16,  -17, -7,
  4,   -21, -26, 0,   -11, -8,  12,  2,   -2,  14,  16,  -1,  8,   4,   -5,
  2,   -1,  -4,  -9,  5,   -6,  0,   8,   6,   -6,  -5,  -8,  -8,  8,   11,
  -17, -8,  12,  10,  16,  14,  -16, -20, 25,  8,   -18, -16, -22, -18, 20,
  28,  -28, -7,  22,  16,  24,  20,  -23, -32, 28,  6,   -22, -12, -23, -16,
  22,  30,  -22, -5,  18,  8,   18,  12,  -16, -22, 14,  4,   -14, -2,  -13,
  -9,  12,  13,  -7,  0,   5,   1,   5,   3,   -5,  -3,  3,   14,  11,  -2,
  1,   -12, -10, -4,  -8,  -27, -16, -2,  3,   19,  20,  7,   13,  36,  22,
  2,   -6,  -25, -28, -8,  -16, -40, -24, 0,   6,   28,  30,  8,   15,  37,
  20,  0,   -5,  -26, -26, -6,  -11, -28, -14, 0,   4,   20,  20,  4,   8,
  14,  10,  -2,  0,   -14, -12, -2,  -2,  -5,  -4,  2,   -1,  6,   4,   0,
  -14, 4,   0,   -4,  2,   2,   -8,  16,  24,  -8,  0,   11,  -8,  0,   9,
  -27, -32, 11,  -2,  -12, 12,  -2,  -10, 36,  36,  -10, -1,  16,  -16, 4,
  10,  -42, -36, 10,  4,   -18, 20,  -10, -4,  38,  28,  -8,  -4,  18,  -20,
  12,  0,   -28, -18, 6,   4,   -14, 14,  -10, 2,   16,  6,   -3,  -2,  8,
  -8,  8,   -4,  -4,  -6,  14,  -21, 22,  -22, 18,  -12, 6,   4,   -15, 24,
  -28, 29,  -24, 18,  -8,  0,   10,  -18, 22,  -24, 20,  -16, 6,   -8,  0,
  4,   -9,  12,  -10, 9,   -1,  15,  -14, 14,  -10, 9,   -8,  6,   -7,  -17,
  22,  -24, 24,  -22, 20,  -18, 12,  14,  -19, 22,  -22, 22,  -19, 17,  -12,
  -6,  10,  -13, 14,  -14, 13,  -12, 7,   8,   -10, 8,   -2,  -4,  7,   -9,
  6,   -16, 20,  -18, 10,  4,   -10, 16,  -12, 19,  -24, 20,  -10, -6,  15,
  -24, 20,  -22, 26,  -20, 8,   10,  -20, 33,  -26, 20,  -24, 18,  -8,  -10,
  20,  -34, 28,  -16, 20,  -14, 6,   9,   -18, 28,  -23, 10,  -12, 8,   -2,
  -8,  13,  -20, 16,  -4,  4,   -2,  1,   4,   -6,  10,  -7,  6,   -10, 12,
  -13, 12,  -10, 7,   -4,  -9,  14,  -18, 20,  -16, 14,  -10, 5,   12,  -19,
  24,  -26, 21,  -18, 15,  -8,  -14, 22,  -27, 30,  -24, 22,  -19, 10,  12,
  -20, 24,  -29, 24,  -22, 21,  -11, -9,  15,  -19, 24,  -21, 18,  -18, 10,
  7,   -11, 13,  -16, 14,  -12, 12,  -7,  -3,  6,   -7,  9,   -8,  6,   -6,
  4
};

static const int32_t mdt8x8_mode9[4096] = {
  1,   2,   2,   4,   4,   4,   4,   6,   2,   4,   6,   8,   9,   10,  11,
  13,  3,   6,   9,   12,  14,  16,  17,  18,  4,   8,   12,  15,  18,  20,
  22,  20,  4,   10,  14,  18,  22,  24,  25,  22,  5,   11,  16,  20,  24,
  26,  26,  22,  6,   13,  18,  22,  24,  25,  24,  22,  8,   14,  18,  20,
  22,  23,  22,  22,  4,   8,   10,  12,  14,  12,  8,   5,   8,   18,  24,
  26,  27,  22,  13,  6,   12,  26,  32,  34,  32,  23,  11,  3,   11,  24,
  30,  30,  24,  14,  2,   -4,  8,   16,  16,  14,  8,   -1,  -8,  -9,  5,
  5,   1,   -4,  -8,  -12, -14, -14, 0,   -4,  -9,  -13, -16, -18, -18, -16,
  -3,  -8,  -12, -14, -16, -18, -18, -17, 1,   -2,  -6,  -8,  -6,  -6,  -8,
  -11, 2,   -3,  -8,  -8,  -9,  -14, -21, -22, 3,   0,   -1,  0,   -6,  -20,
  -28, -26, 6,   14,  18,  17,  3,   -16, -26, -25, 10,  26,  34,  29,  12,
  -8,  -21, -22, 13,  28,  33,  26,  14,  -1,  -14, -18, 14,  24,  22,  16,
  10,  2,   -8,  -14, 14,  18,  14,  10,  8,   3,   -4,  -8,  2,   4,   9,
  10,  4,   -4,  -9,  -8,  9,   22,  30,  22,  0,   -14, -16, -12, 16,  37,
  39,  16,  -12, -22, -18, -10, 18,  30,  16,  -10, -26, -24, -14, -7,  13,
  8,   -14, -30, -26, -12, -3,  -2,  3,   -8,  -20, -21, -7,  8,   11,  7,
  -3,  -7,  -6,  2,   12,  18,  18,  15,  -2,  0,   6,   12,  16,  16,  18,
  17,  -2,  4,   6,   -5,  -18, -16, -6,  2,   6,   20,  13,  -20, -40, -24,
  0,   6,   14,  32,  15,  -26, -34, -8,  10,  8,   16,  22,  4,   -11, 6,
  22,  13,  2,   7,   -4,  -12, 11,  40,  32,  3,   -7,  -6,  -22, -14, 20,
  34,  12,  -12, -10, -11, -19, -6,  10,  6,   -10, -16, -10, -8,  -6,  0,
  -3,  -12, -14, -11, -10, 2,   12,  16,  12,  8,   10,  12,  9,   8,   22,
  19,  10,  12,  22,  24,  12,  10,  10,  -4,  -11, 4,   22,  18,  4,   3,
  -14, -32, -28, -8,  0,   -9,  -13, -4,  -22, -28, -14, -4,  -18, -32, -22,
  -4,  -6,  6,   19,  8,   -17, -26, -14, 2,   15,  31,  32,  14,  -4,  -10,
  -6,  10,  23,  29,  22,  10,  4,   0,   -4,  -2,  -2,  2,   4,   4,   -1,
  -1,  4,   -4,  -8,  -4,  -1,  -3,  -2,  6,   14,  -2,  -2,  -5,  -17, -20,
  0,   24,  26,  12,  23,  3,   -32, -34, 5,   33,  21,  24,  44,  16,  -30,
  -30, 5,   21,  2,   22,  39,  18,  -12, -14, 0,   0,   -12, 13,  17,  10,
  3,   -1,  -8,  -16, -16, 5,   2,   2,   6,   0,   -12, -16, -14, -12, -28,
  -28, -20, -11, -2,  3,   6,   -18, -36, -32, -17, 0,   13,  16,  10,  -5,
  -4,  -2,  3,   15,  24,  18,  4,   16,  30,  17,  4,   9,   12,  -4,  -17,
  20,  22,  -4,  -15, -2,  -5,  -26, -30, 2,   -14, -25, -12, 2,   -6,  -18,
  -18, -12, -25, -13, 10,  14,  6,   4,   5,   -10, -9,  8,   20,  18,  15,
  17,  14,  -7,  -9,  4,   16,  9,   -8,  -16, -10, -19, -22, 12,  39,  20,
  -16, -27, -15, -23, -26, 6,   28,  18,  -6,  -15, -12, -13, -14, -12, -10,
  8,   22,  9,   -12, 2,   -1,  -22, -28, 11,  41,  15,  -19, 6,   1,   -12,
  -8,  20,  27,  0,   -22, 0,   -2,  4,   14,  16,  2,   -14, -18, -4,  -1,
  10,  14,  3,   -10, -14, -13, 2,   3,   1,   -10, -21, -20, -12, -10, 6,
  10,  0,   -13, -14, -10, -14, -18, 14,  11,  -9,  -6,  21,  23,  -6,  -19,
  22,  5,   -24, -5,  38,  38,  1,   -14, 20,  4,   -23, -18, 7,   14,  4,
  -2,  13,  16,  0,   -24, -33, -15, 9,   13,  10,  24,  17,  -13, -33, -17,
  12,  19,  12,  18,  13,  0,   -8,  -2,  9,   14,  -2,  -1,  -1,  -7,  -16,
  -15, 0,   12,  -12, -2,  14,  1,   -32, -30, 11,  30,  -20, -9,  29,  28,
  -16, -23, 20,  34,  -19, -22, 14,  35,  8,   -8,  8,   12,  -8,  -18, -11,
  4,   2,   -5,  -14, -16, 6,   8,   -11, -25, -14, -6,  -14, -20, 16,  26,
  6,   -16, -10, 2,   0,   -6,  16,  22,  14,  7,   5,   8,   10,  6,   -2,
  -11, -16, -12, -8,  -10, -18, -19, 2,   -6,  -14, -6,  3,   -8,  -25, -21,
  10,  13,  8,   12,  16,  4,   -2,  6,   3,   10,  17,  14,  0,   4,   27,
  30,  -20, -21, 5,   2,   -26, -14, 22,  27,  -30, -32, 2,   6,   -20, -28,
  -11, 4,   -14, -6,  16,  23,  8,   -18, -26, -12, 7,   18,  24,  24,  17,
  -3,  -16, -13, 12,  14,  -8,  -25, -10, 14,  8,   -6,  26,  26,  -17, -35,
  4,   26,  4,   -11, 21,  15,  -12, -6,  16,  5,   -8,  0,   0,   -10, -2,
  16,  4,   -12, 0,   8,   -7,  -13, -7,  -8,  -8,  12,  14,  -10, 6,   6,
  -20, -34, 6,   42,  10,  -31, 14,  14,  -13, -17, 20,  30,  -8,  -31, 9,
  8,   2,   8,   14,  2,   -15, -17, 1,   -10, -14, 4,   13,  -6,  -6,  16,
  20,  -8,  -30, 17,  26,  -26, -10, 38,  42,  4,   -34, 18,  20,  -38, -11,
  38,  36,  8,   -23, 5,   6,   -22, -11, 12,  11,  -4,  -9,  2,   6,   5,
  -4,  -9,  -5,  -8,  2,   6,   6,   10,  2,   -4,  -2,  2,   4,   2,   -6,
  -8,  2,   8,   6,   8,   2,   -6,  -16, -18, -2,  10,  13,  37,  28,  -2,
  -17, -16, -7,  0,   17,  26,  8,   -4,  -10, -18, -10, 3,   4,   -22, -24,
  10,  18,  -4,  -3,  10,  -3,  -20, -14, 16,  20,  -2,  0,   17,  14,  24,
  6,   -4,  -2,  -14, -9,  14,  22,  20,  -6,  -6,  2,   -20, -20, 4,   -4,
  -26, -18, 20,  24,  -8,  -14, 0,   -24, -37, -7,  26,  24,  10,  3,   4,
  -2,  2,   12,  18,  0,   -26, -24, -5,  7,   6,   4,   12,  2,   -21, -14,
  4,   18,  8,   -16, -10, 6,   14,  18,  6,   0,   -2,  -4,  -10, -1,  26,
  20,  -14, -30, -12, 32,  6,   -19, 6,   -4,  -35, -30, -4,  30,  1,   -16,
  4,   -9,  -30, -5,  0,   -10, -16, 8,   24,  10,  -8,  4,   -10, -31, -16,
  17,  28,  20,  9,   -2,  0,   10,  22,  26,  12,  -16, -24, -10, -10, 1,
  5,   16,  10,  -24, -26, -8,  -4,  -8,  -22, -8,  3,   0,   10,  13,  9,
  -9,  -3,  4,   -4,  16,  40,  26,  2,   -16, 22,  24,  -15, -10, 18,  18,
  -8,  -24, 0,   10,  -12, -32, -20, 11,  6,   -16, -26, -6,  10,  -6,  -15,
  14,  21,  0,   -15, 2,   27,  26,  12,  -19, -14, 16,  10,  -20, -9,  16,
  12,  -30, -18, 24,  8,   -22, -3,  14,  8,   -4,  0,   -2,  -4,  10,  3,
  -12, 2,   30,  10,  -26, 2,   26,  -13, -18, 11,  24,  -2,  -12, 14,  -3,
  -20, 10,  15,  -8,  -8,  16,  6,   -22, 10,  24,  -8,  -20, -5,  16,  -6,
  -2,  32,  4,   -35, -12, -6,  -3,  -4,  16,  20,  -16, -36, 10,  32,  22,
  2,   14,  31,  16,  0,   -4,  7,   4,   -13, 0,   12,  0,   -4,  -15, -18,
  -12, -6,  -10, -21, -14, 3,   2,   8,   5,   8,   4,   -4,  3,   4,   3,
  16,  16,  0,   4,   26,  11,  -19, -29, -16, 14,  -14, -25, 10,  0,   -32,
  -40, -22, 22,  -2,  -33, -10, 4,   -2,  -16, 8,   31,  18,  -3,  -1,  18,
  26,  37,  18,  -24, 12,  30,  -12, -5,  22,  41,  0,   -32, 16,  8,   -24,
  2,   15,  3,   -15, 2,   -1,  -24, 5,   10,  -21, -10, -2,  16,  -2,  -3,
  21,  4,   -21, 11,  4,   -10, 8,   13,  -8,  2,   11,  10,  -8,  -17, 0,
  -13, -13, 14,  6,   -10, -8,  10,  -7,  -16, 20,  11,  -27, -12, 6,   22,
  4,   10,  26,  -6,  -32, -12, -6,  28,  35,  10,  2,   22,  32,  -11, -10,
  2,   4,   -4,  -10, 7,   21,  4,   2,   -24, -26, 0,   -5,  -22, -18, 0,
  13,  11,  0,   9,   12,  -12, -18, -14, 0,   26,  8,   -4,  12,  10,  12,
  -4,  -12, -23, -23, -6,  -6,  -4,  17,  20,  4,   -34, -12, 14,  -15, -23,
  6,   30,  24,  10,  26,  25,  -4,  -10, 2,   -15, -32, -30, -5,  24,  32,
  21,  11,  -2,  6,   -4,  -4,  10,  -2,  -8,  7,   10,  34,  17,  -9,  -12,
  -22, -24, 0,   -11, -6,  -12, -8,  16,  13,  -2,  8,   -19, -10, -12, -6,
  22,  16,  1,   10,  3,   31,  19,  -10, -15, -18, -16, -6,  3,   8,   7,
  1,   -7,  -10, -10, -10, -21, -38, -16, 17,  28,  24,  12,  3,   10,  6,
  3,   4,   -6,  -2,  -3,  -16, 14,  -10, -4,  8,   -11, -2,  4,   -6,  -1,
  -4,  0,   -1,  5,   4,   -2,  24,  -26, 26,  9,   -28, 27,  4,   -38, 32,
  -42, 29,  8,   -38, 24,  2,   -43, 22,  -26, 3,   3,   -13, 4,   9,   -2,
  7,   4,   -2,  3,   4,   -7,  10,  14,  -8,  14,  8,   1,   -2,  -6,  0,
  -6,  -16, -11, -22, 0,   34,  26,  -12, -31, -25, 1,   -6,  2,   3,   -2,
  6,   2,   -14, 12,  9,   -4,  -23, -22, 15,  30,  8,   -2,  -12, -4,  20,
  8,   -15, -8,  3,   -6,  -6,  2,   24,  12,  -14, -15, -10, 7,   13,  -2,
  -20, -15, 18,  26,  -4,  -1,  -6,  0,   4,   -8,  -2,  16,  8,   -16, -20,
  15,  44,  7,   -39, -22, 6,   -32, 6,   12,  -14, 14,  -2,  -24, 14,  -30,
  12,  2,   -19, 18,  0,   -17, 13,  9,   0,   -8,  6,   -4,  1,   15,  -13,
  22,  -10, -1,  20,  -16, -1,  14,  -16, -7,  8,   5,   -11, 12,  -2,  -20,
  20,  -32, 22,  2,   -34, 27,  6,   -23, 34,  -27, 10,  10,  -16, 2,   12,
  0,   -3,  -8,  0,   18,  2,   -20, 8,   7,   -31, -11, -18, 6,   16,  -22,
  -30, 8,   24,  4,   4,   -2,  2,   7,   -7,  -10, 12,  -2,  20,  -4,  -22,
  28,  22,  -26, -4,  -30, 0,   18,  -10, -9,  -2,  -4,  14,  -13, -6,  9,
  8,   -14, -14, 8,   12,  20,  10,  -14, 1,   15,  10,  -8,  -20, -6,  5,
  14,  -4,  -10, 6,   2,   -14, -38, -7,  38,  -1,  -40, -6,  27,  16,  16,
  18,  -11, -10, 20,  -6,  -32, 9,   -22, 22,  4,   -28, 24,  -2,  -35, 36,
  -50, 17,  15,  -32, 19,  8,   -20, 32,  -18, 10,  2,   -10, 12,  2,   -14,
  -5,  14,  0,   -6,  9,   -4,  -6,  -4,  -16, 2,   -6,  3,   4,   -8,  2,
  11,  9,   -8,  2,   2,   -4,  9,   4,   -2,  16,  4,   6,   -9,  -4,  14,
  -6,  -24, -3,  34,  -2,  -26, 16,  2,   -28, 2,   25,  15,  -8,  -2,  8,
  -8,  3,   12,  -5,  -12, -6,  17,  -2,  -6,  19,  -1,  -26, 8,   0,   -11,
  6,   4,   -12, -4,  10,  12,  6,   -12, 0,   4,   -7,  1,   24,  -28, 11,
  21,  -20, 10,  22,  -26, -6,  -31, 14,  12,  -16, 19,  2,   -34, 8,   6,
  4,   -22, -2,  12,  -24, -2,  42,  6,   -9,  22,  30,  -1,  22,  12,  -31,
  18,  -18, -14, -2,  -18, -2,  4,   -7,  6,   2,   -8,  -8,  2,   -10, -2,
  23,  -9,  6,   21,  12,  8,   8,   0,   -8,  6,   -12, -6,  -4,  -12, 6,
  -2,  -20, 10,  4,   -7,  -10, 4,   -3,  -14, 26,  -26, 26,  29,  -12, 24,
  10,  -24, 34,  -42, 4,   4,   -32, 6,   16,  -22, -8,  -14, -23, -24, -24,
  -20, -8,  -12, -26, 14,  18,  20,  24,  8,   8,   18,  6,   6,   2,   -1,
  5,   2,   -4,  6,   13,  -19, -17, -21, -24, -10, -8,  -15, -12, 6,   20,
  22,  16,  8,   10,  6,   0,   7,   4,   4,   3,   2,   2,   0,   14,  -26,
  -19, -22, -40, -11, -8,  -28, 2,   -10, 32,  30,  2,   22,  18,  -8,  5,
  14,  18,  -17, -31, 8,   37,  23,  -2,  -12, -6,  10,  22,  -12, -32, -9,
  -8,  -6,  6,   -5,  6,   4,   -7,  7,   -7,  4,   21,  -24, -20, 17,  20,
  26,  -2,  -16, 0,   8,   19,  -8,  -35, -6,  -3,  -3,  2,   -1,  0,   4,
  -2,  -4,  -2,  6,   9,   -17, -24, 20,  31,  8,   11,  -21, -3,  24,  14,
  -16, -32, -14, 10,  6,   28,  24,  -13, -32, -21, -2,  0,   -10, -16, -16,
  14,  26,  7,   7,   -4,  -8,  10,  -12, 4,   8,   -8,  14,  -6,  -8,  42,
  2,   -11, -18, -30, 14,  -10, -25, -2,  -25, 16,  32,  -6,  12,  -8,  -10,
  7,   -12, 3,   10,  -5,  8,   0,   8,   29,  10,  -18, -24, -17, -4,  6,
  -16, -20, -10, 16,  33,  9,   -10, 4,   -54, 13,  10,  -15, 26,  0,   -16,
  26,  -10, 13,  -10, -10, -2,  -6,  0,   -2,  22,  -8,  -4,  15,  -12, 4,
  11,  -22, -15, 2,   7,   0,   12,  0,   -4,  8,   -19, 18,  -10, -14, 6,
  -12, 2,   8,   16,  -6,  -6,  14,  -13, 2,   12,  -20, 6,   -8,  14,  6,
  3,   12,  -16, 4,   -16, 20,  0,   -38, 18,  0,   -35, 42,  -2,  4,   13,
  -21, -20, 9,   2,   16,  17,  -28, 18,  4,   2,   19,  -40, 14,  34,  -38,
  24,  -2,  -16, 30,  -32, 17,  24,  -20, 21,  -14, -26, 24,  -7,  14,  2,
  -12, 4,   10,  9,   0,   -16, -4,  -2,  -2,  1,   2,   2,   0,   -2,  -2,
  4,   4,   5,   -16, -14, 8,   4,   12,  -2,  -12, 0,   14,  17,  -6,  -24,
  8,   18,  -8,  0,   4,   14,  11,  -28, -4,  12,  -24, 24,  -12, -24, 20,
  -11, 24,  16,  -15, 12,  -3,  -5,  12,  -12, 10,  1,   10,  -18, 10,  18,
  -17, 2,   -24, -34, 29,  -17, 0,   2,   -23, 46,  -15, -20, 20,  -14, 4,
  12,  -16, 16,  -3,  10,  -2,  -8,  7,   8,   -8,  -19, -8,  2,   -4,  14,
  -8,  -19, 18,  16,  4,   -16, -31, 4,   16,  -18, -1,  36,  20,  24,  17,
  2,   -4,  7,   0,   -23, -14, 0,   1,   -2,  -5,  4,   -6,  -7,  0,   -28,
  -8,  -8,  9,   -2,  -6,  42,  6,   3,   38,  -19, 4,   16,  -22, 2,   -26,
  -16, 10,  -9,  -2,  6,   -15, 2,   -5,  -26, -16, 2,   2,   0,   8,   30,
  21,  30,  16,  -12, -2,  8,   -10, -16, -17, 10,  -24, 20,  -12, -13, 22,
  -25, 18,  26,  -20, 19,  -4,  -4,  14,  -22, 16,  0,   4,   -7,  0,   4,
  -12, 18,  -16, -28, 20,  -14, 4,   8,   -19, 24,  -19, 4,   -4,  3,   -2,
  1,   4,   -12, 14,  33,  -34, 23,  -8,  -17, 29,  -28, 19,  20,  -20, 20,
  2,   -14, 16,  -9,  -2,  3,   -2,  -10, 6,   1,   -8,  8,   -4,  -28, 4,
  26,  0,   -6,  26,  4,   -43, 12,  1,   -25, -2,  -1,  -22, 2,   24,  0,
  4,   6,   5,   6,   5,   0,   10,  -17, -2,  16,  -5,  -7,  19,  -10, -32,
  16,  0,   -24, 6,   -2,  -20, 9,   21,  -6,  8,   4,   7,   8,   1,   8,
  4,   -21, -4,  10,  -8,  -5,  15,  -13, -36, 36,  -10, -20, 20,  -3,  -22,
  13,  30,  10,  18,  16,  20,  14,  8,   11,  21,  -13, -27, -29, -22, -23,
  -14, -18, -18, 10,  26,  24,  21,  16,  18,  10,  4,   -6,  -7,  -13, -3,
  -5,  -10, 0,   8,   -6,  -10, -11, -10, -12, -2,  -10, -12, 16,  22,  28,
  24,  16,  22,  8,   10,  -12, -30, -28, -22, -21, -18, -11, 4,   6,   15,
  14,  10,  11,  12,  3,   -10, 9,   -16, 20,  -12, -3,  22,  -24, 18,  14,
  -14, 12,  -6,  -6,  6,   -12, 5,   -1,  4,   -6,  8,   1,   -8,  14,  -10,
  -10, 4,   -1,  -4,  1,   5,   -8,  4,   11,  -10, 7,   -6,  -3,  7,   -12,
  13,  0,   7,   -9,  8,   6,   -19, 25,  -16, -40, 38,  -26, 2,   22,  -32,
  34,  -27, -29, 33,  -20, 0,   17,  -21, 16,  0,   -48, 32,  -4,  -20, 22,
  -14, -11, 12,  19,  -8,  -7,  14,  -8,  8,   16,  -12, 14,  -14, 12,  -3,
  -10, 5,   -14, 4,   -24, 15,  1,   -14, 18,  -4,  -10, 16,  9,   -2,  -10,
  18,  -11, 2,   18,  -18, 8,   -8,  6,   0,   -12, 7,   -14, 2,   -16, 14,
  1,   -12, 20,  -6,  -4,  24,  6,   -2,  -16, 22,  -12, -14, 41,  -42, -8,
  9,   -24, 23,  7,   -15, 32,  -28, -9,  16,  4,   -18, -4,  -2,  -11, 12,
  8,   -24, 10,  4,   2,   14,  -14, 15,  10,  5,   -8,  8,   -7,  -6,  16,
  -22, -18, 19,  -6,  -6,  3,   -5,  -3,  6,   8,   -24, 8,   6,   0,   15,
  -12, 16,  21,  8,   -2,  -4,  -8,  -10, 12,  -20, -46, 33,  -20, 1,   30,
  -30, 26,  -8,  -10, -27, -12, 4,   31,  16,  -6,  10,  16,  30,  20,  -14,
  -34, -22, 1,   -11, -14, -20, -21, 15,  28,  12,  8,   -2,  0,   8,   6,
  -7,  -8,  -4,  -4,  9,   14,  7,   7,   -5,  -14, -6,  -2,  -5,  -18, -24,
  -16, 17,  30,  14,  6,   -2,  10,  30,  16,  -21, -31, -16, -6,  6,   4,
  -32, -4,  17,  12,  16,  -6,  -3,  -10, -16, 20,  26,  -4,  -19, -18, 5,
  20,  12,  -24, -32, 2,   32,  12,  0,   -20, -8,  18,  30,  -4,  -27, -10,
  0,   6,   6,   -10, -10, 3,   10,  2,   -1,  8,   2,   -8,  -8,  0,   11,
  4,   2,   -18, -8,  23,  26,  -6,  -27, -12, 0,   24,  8,   -24, -32, 12,
  30,  10,  0,   -15, -12, 26,  15,  -9,  -14, -12, 6,   -19, -6,  6,   -3,
  -18, 4,   26,  20,  25,  12,  -10, 8,   22,  -6,  -37, -24, -22, -11, 9,
  -6,  -20, 8,   30,  18,  6,   8,   -8,  6,   5,   0,   -12, -4,  8,   4,
  -6,  8,   0,   -2,  -18, -12, -22, -8,  8,   -7,  -18, 16,  35,  21,  21,
  12,  -12, 9,   20,  -18, -37, -20, -12, -6,  12,  -8,  -17, 14,  18,  10,
  -4,  6,   -12, 6,   -9,  8,   -10, 2,   -4,  10,  -10, 24,  -24, 21,  -10,
  10,  -14, 21,  -32, 28,  -28, 23,  -23, 6,   -14, 27,  -32, 39,  -34, 27,
  -13, 6,   -10, 14,  -21, 25,  -26, 22,  -14, 7,   -4,  10,  -13, 11,  -11,
  8,   -12, 2,   -3,  4,   -6,  11,  -8,  5,   4,   2,   0,   2,   -4,  2,
  -3,  6,   -8,  0,   22,  -4,  -10, 1,   7,   -20, 4,   30,  -28, 2,   23,
  -13, 4,   19,  -2,  -41, 24,  -5,  -17, 6,   1,   -25, 8,   30,  -6,  2,
  10,  -3,  0,   14,  -8,  -8,  -16, 6,   -4,  2,   -6,  8,   -5,  -14, 21,
  2,   -21, 20,  -8,  -14, 8,   34,  -23, 4,   16,  -11, -4,  30,  -20, -30,
  14,  -4,  -14, 14,  -5,  -17, 12,  16,  15,  -22, 28,  -25, 19,  -12, 11,
  -12, 12,  -20, 24,  -34, 38,  -37, 25,  -5,  6,   -10, 16,  -14, 12,  -8,
  8,   -12, -2,  8,   -14, 18,  -22, 23,  -20, 13,  -16, 22,  -30, 28,  -26,
  18,  -10, 9,   -6,  8,   -4,  8,   -8,  8,   -6,  -8,  10,  -11, 6,   -6,
  5,   -4,  1,   11,  -4,  2,   4,   -6,  5,   -2,  4,   -10, -14, 14,  -6,
  -10, 26,  -31, 24,  -8,  16,  -22, 20,  -12, 0,   6,   1,   -5,  -1,  4,
  -8,  8,   -6,  4,   -12, 13,  -21, 28,  -25, 19,  -12, 8,   4,   -5,  9,
  -19, 14,  -9,  3,   0,   -4,  -1,  19,  -20, 28,  -35, 35,  -27, 17,  2,
  -2,  -8,  14,  -14, 18,  -19, 20,  -23, 14,  -14, 10,  -8,  -4,  13,  -19,
  20,  -26, 28,  -22, 8,   6,   -11, 10,  -7,  18,  -20, 15,  -4,  -6,  8,
  -3,  4,   6,   -12, 20,  -26, 25,  -18, 4,   -4,  -6,  6,   -2,  -4,  14,
  -20, 27,  -14, 8,   -6,  -2,  10,  -24, 26,  -24, 12,  -12, 20,  -20, 22,
  -15, 15,  -18, 13,  -16, 22,  -27, 24,  -16, 2,   14,  -17, 8,   -10, 10,
  -4,  -6,  17,  -28, 21,  4,   -20, 17,  -22, 19,  -22, 16,  -12, 14,  2,
  13,  -7,  16,  -5,  6,   4,   -15, -6,  -18, 6,   -22, 9,   -14, -1,  6,
  18,  7,   11,  8,   5,   6,   4,   -4,  -24, 2,   -28, 11,  -23, 8,   -8,
  10,  10,  12,  12,  0,   12,  -1,  0,   -19, 14,  -38, 27,  -34, 22,  -21,
  14,  -12, 26,  -24, 30,  -24, 20,  -11, 2,   16,  0,   -1,  14,  -2,  -8,
  27,  -20, -26, -1,  -2,  -25, 8,   -3,  -27, 20,  30,  4,   8,   28,  -10,
  14,  20,  -10, -25, -6,  -20, -12, -4,  -14, -10, -6,  8,   18,  18,  2,
  16,  10,  0,   20,  10,  -30, -12, 8,   -26, 0,   5,   -26, -20, 36,  -3,
  -2,  17,  2,   -10, 24,  12,  -20, 2,   11,  -23, 15,  -4,  -8,  -2,  5,
  19,  -14, 19,  -2,  0,   14,  8,   -24, -13, -2,  -12, -12, 8,   -24, -4,
  32,  17,  9,   14,  14,  -2,  21,  -8,  -29, -26, -12, -18, -9,  -12, -8,
  21,  20,  28,  14,  14,  8,   20,  -8,  -24, -12, -19, -22, 0,   -14, -18,
  14,  20,  11,  3,   31,  -18, 26,  4,   -10, -22, 16,  -21, 4,   -4,  -2,
  -8,  10,  -6,  -2,  -4,  -10, 4,   8,   16,  5,   10,  5,   9,   13,  -4,
  -20, -25, -9,  -14, -7,  -14, -14, 2,   34,  30,  13,  13,  11,  13,  18,
  -5,  -41, -33, -14, -10, -14, -11, -20, 8,   40,  33,  11,  8,   12,  10,
  16,  -8,  -32, -28, -7,  -4,  -8,  -6,  -13, 6,   22,  20,  4,   6,   -3,
  10,  -2,  4,   -14, -4,  -2,  -11, 12,  -24, 30,  -26, 27,  -18, 10,  -2,
  9,   1,   -8,  1,   -10, 4,   -4,  7,   -25, 18,  -14, 26,  -12, 16,  -7,
  4,   14,  -5,  2,   -20, 6,   -15, 6,   -15, 1,   -12, 16,  0,   10,  4,
  1,   16,  -9,  21,  -26, 16,  -24, 10,  -10, -2,  -6,  0,   4,   -1,  8,
  -4,  7,   -14, 28,  -34, 36,  -36, 27,  -20, 6,   3,   8,   2,   -8,  -18,
  6,   -5,  0,   -10, -10, -9,  22,  24,  -4,  3,   2,   12,  16,  13,  -36,
  -28, 0,   2,   -6,  -10, -24, -10, 40,  33,  0,   -4,  8,   6,   31,  2,
  -34, -36, 3,   4,   -7,  -3,  -32, 4,   25,  33,  -7,  -3,  5,   6,   18,
  2,   -23, -16, 0,   8,   -6,  -6,  -4,  -7,  19,  -2,  6,   -10, 6,   -18,
  11,  -6,  14,  -10, -8,  10,  2,   25,  -10, 0,   -14, 13,  16,  -20, -4,
  -28, 6,   12,  11,  -16, -22, 26,  9,   26,  2,   -25, -6,  20,  20,  -22,
  -16, -19, -10, 33,  3,   -24, -14, 14,  22,  12,  13,  -34, 0,   24,  5,
  -4,  -25, -8,  -10, 24,  3,   -23, 4,   -4,  22,  5,   2,   -10, -3,  16,
  -8,  7,   -12, -14, 26,  -24, 7,   2,   -6,  8,   -11, 14,  -33, 31,  -3,
  -9,  11,  -12, 18,  -4,  29,  -26, -8,  18,  -14, 10,  -20, -9,  -16, 16,
  16,  -20, 7,   1,   13,  21,  2,   -4,  -22, 16,  4,   -16, 0,   -26, 7,
  0,   17,  -4,  -19, 32,  -12, 23,  -11, 4,   -12, -2,  22,  -33, 17,  -13,
  10,  -6,  8,   1,   -14, 20,  -11, 6,   4,   -9,  0,   -2,  -3,  -1,  16,
  -15, -3,  14,  2,   2,   10,  -2,  -28, 23,  2,   -18, -4,  0,   -18, 9,
  36,  -26, -2,  24,  2,   2,   24,  -14, -40, 28,  0,   -25, 0,   -2,  -26,
  18,  37,  -23, -1,  26,  -6,  5,   22,  -18, -28, 16,  1,   -20, 8,   -6,
  -14, 14,  18,  -10, 2,   8,   -4,  2,   9,   -9,  -6,  10,  -14, 18,  -22,
  25,  -27, 24,  -12, -8,  10,  -12, 17,  -22, 26,  -27, 16,  0,   4,   -8,
  8,   -4,  -7,  14,  -8,  4,   -10, 21,  -26, 26,  -14, 2,   -2,  2,   4,
  -16, 25,  -29, 19,  -9,  8,   -12, 11,  -4,  -5,  12,  -6,  2,   -4,  18,
  -24, 22,  -18, 11,  -12, 9,   -3,  -14, 22,  -26, 24,  -22, 19,  -14, 6,
  -4,  -2,  11,  -14, 12,  -4,  -7,  10,  14,  -4,  -10, 18,  -16, 2,   16,
  -19, -23, 13,  7,   -18, 18,  0,   -23, 29,  30,  -20, -2,  14,  -15, -3,
  28,  -36, -29, 20,  0,   -13, 16,  2,   -26, 34,  22,  -15, -3,  15,  -18,
  4,   18,  -26, -12, 6,   8,   -17, 20,  -10, -7,  14,  4,   -2,  -6,  13,
  -16, 11,  -2,  -4,  -8,  10,  -7,  3,   2,   -5,  6,   -5,  16,  -18, 14,
  -6,  -4,  10,  -12, 10,  -23, 26,  -19, 8,   7,   -15, 18,  -16, 26,  -30,
  22,  -8,  -9,  18,  -23, 19,  -25, 29,  -20, 6,   12,  -22, 26,  -22, 20,
  -24, 14,  -2,  -14, 22,  -27, 20,  -13, 15,  -8,  -1,  12,  -18, 22,  -16,
  6,   -7,  4,   2,   -8,  12,  -13, 8,   -6,  10,  -15, 18,  -19, 16,  -12,
  6,   8,   -16, 23,  -28, 30,  -26, 19,  -10, -6,  12,  -18, 24,  -27, 24,
  -18, 10,  -2,  -2,  6,   -12, 14,  -14, 10,  -6,  8,   -10, 10,  -6,  4,
  -1,  1,   0,   -14, 19,  -22, 22,  -20, 16,  -12, 6,   13,  -20, 24,  -26,
  26,  -21, 16,  -9,  -8,  13,  -17, 19,  -20, 16,  -13, 7,   4,   -5,  8,
  -8,  8,   -6,  5,   -2,  -7,  12,  -15, 16,  -16, 14,  -10, 4,   10,  -16,
  22,  -24, 22,  -20, 14,  -7,  -12, 18,  -25, 28,  -26, 23,  -16, 8,   12,
  -20, 26,  -28, 27,  -24, 18,  -10, -10, 17,  -23, 25,  -24, 22,  -17, 9,
  7,   -13, 17,  -18, 18,  -16, 14,  -8,  -4,  6,   -10, 10,  -10, 10,  -8,
  4
};

static const int32_t mdt8x8_mode10[4096] = {
  2,   2,   2,   2,   2,   3,   4,   3,   4,   6,   6,   8,   8,   8,   9,
  9,   6,   8,   10,  14,  14,  14,  15,  14,  6,   9,   14,  17,  19,  20,
  21,  19,  7,   11,  16,  20,  22,  25,  25,  22,  8,   13,  17,  21,  24,
  26,  24,  21,  8,   14,  18,  22,  24,  24,  22,  20,  10,  16,  18,  20,
  22,  24,  22,  20,  2,   4,   6,   6,   8,   7,   5,   0,   6,   14,  19,
  24,  25,  19,  10,  -1,  12,  20,  29,  36,  34,  23,  6,   -7,  16,  24,
  27,  30,  26,  12,  -6,  -14, 16,  20,  18,  16,  8,   -6,  -18, -19, 10,
  9,   8,   4,   -5,  -17, -22, -20, 3,   2,   2,   -4,  -12, -18, -20, -20,
  0,   0,   -4,  -9,  -14, -15, -18, -20, 3,   3,   1,   0,   -4,  -7,  -11,
  -12, 8,   8,   2,   -5,  -15, -24, -31, -25, 9,   10,  2,   -7,  -20, -35,
  -42, -30, 12,  12,  8,   3,   -10, -28, -34, -24, 14,  18,  19,  15,  4,
  -9,  -16, -14, 12,  20,  24,  19,  10,  2,   -4,  -6,  10,  21,  22,  17,
  12,  4,   -1,  -1,  12,  20,  18,  14,  12,  6,   1,   2,   2,   4,   7,
  8,   1,   -6,  -8,  -3,  12,  20,  27,  18,  -3,  -14, -6,  8,   20,  36,
  36,  11,  -18, -20, 4,   20,  26,  34,  14,  -18, -32, -15, 12,  17,  24,
  17,  -16, -38, -28, 0,   14,  6,   12,  -4,  -23, -25, -9,  10,  8,   1,
  -4,  -13, -12, -2,  7,   8,   2,   3,   -10, -8,  0,   8,   8,   3,   2,
  6,   1,   4,   2,   -8,  -10, -6,  4,   9,   9,   14,  -2,  -28, -28, -4,
  18,  19,  18,  22,  -10, -42, -28, 14,  31,  15,  20,  16,  -14, -28, -2,
  28,  19,  -3,  14,  4,   -9,  2,   24,  18,  -10, -18, 5,   0,   4,   22,
  22,  -5,  -26, -18, 0,   2,   14,  20,  3,   -17, -20, -12, 0,   6,   13,
  8,   -8,  -14, -12, -10, 4,   8,   4,   4,   12,  16,  10,  0,   12,  16,
  6,   6,   29,  37,  16,  -11, 18,  10,  -10, -8,  22,  33,  -3,  -28, 12,
  -4,  -32, -34, -4,  4,   -28, -31, 4,   -8,  -30, -32, -14, -14, -23, -9,
  0,   -3,  -4,  2,   0,   -8,  3,   16,  -2,  1,   14,  20,  9,   4,   18,
  22,  -1,  3,   10,  11,  5,   10,  16,  14,  4,   0,   -5,  -4,  2,   6,
  6,   6,   9,   -2,  -12, -4,  7,   13,  18,  19,  9,   -8,  -15, -5,  -1,
  4,   22,  28,  3,   -6,  -2,  -4,  -24, -26, 10,  26,  0,   13,  22,  -1,
  -40, -42, 0,   20,  8,   31,  34,  2,   -32, -27, -2,  8,   16,  32,  24,
  0,   -14, -9,  -2,  -1,  16,  20,  8,   0,   -3,  -4,  -4,  -4,  6,   4,
  -6,  -16, -11, 1,   2,   -6,  21,  12,  -17, -34, -17, 6,   0,   -16, 30,
  22,  -14, -23, -1,  8,   -8,  -16, 30,  20,  4,   16,  22,  2,   -8,  6,
  21,  6,   7,   26,  15,  -10, 6,   29,  8,   -6,  -10, -8,  -18, -12, 17,
  29,  -2,  -10, -18, -30, -30, -4,  20,  19,  -4,  -8,  -15, -22, -17, 2,
  14,  12,  0,   10,  12,  10,  7,   1,   4,   9,   8,   26,  24,  14,  2,
  -4,  10,  18,  9,   20,  16,  6,   -14, -18, 4,   18,  -6,  -14, -1,  12,
  -8,  -32, -14, 14,  -22, -40, -6,  36,  16,  -32, -19, 18,  -21, -34, 1,
  38,  18,  -18, -5,  18,  -14, -16, 4,   16,  3,   -5,  4,   10,  -8,  -6,
  0,   -4,  -8,  -2,  0,   2,   -1,  -5,  -5,  6,   17,  22,  8,   -8,  -2,
  -12, -16, -5,  22,  36,  7,   -22, 2,   -3,  -12, -22, -10, 10,  1,   -18,
  2,   18,  18,  -14, -35, -16, 8,   4,   3,   18,  32,  17,  -12, -8,  16,
  13,  -1,  -7,  6,   26,  25,  14,  4,   -6,  -10, -28, -22, 12,  28,  14,
  -12, -20, -14, -28, -24, 0,   10,  0,   -13, -15, -8,  -12, -12, -18, -14,
  10,  24,  16,  -23, -18, -4,  -20, -26, 14,  43,  20,  -26, -4,  24,  4,
  -21, 2,   22,  3,   -10, 12,  28,  15,  -8,  -18, -24, -20, 12,  10,  3,
  4,   1,   -18, -35, -24, 18,  -1,  -18, -9,  5,   2,   -6,  -5,  9,   -4,
  -14, -6,  6,   16,  18,  13,  1,   0,   1,   4,   9,   17,  20,  15,  2,
  15,  20,  4,   -6,  -2,  0,   -6,  -2,  26,  34,  -3,  -18, 6,   4,   -17,
  -20, 18,  30,  -18, -24, 20,  8,   -28, -37, -2,  26,  -15, -18, 26,  12,
  -24, -38, 0,   29,  -2,  -14, 12,  14,  -3,  -17, 11,  21,  -2,  -14, -6,
  10,  14,  4,   10,  0,   -10, -12, -12, 4,   16,  5,   1,   -11, -14, -6,
  -2,  4,   8,   -13, -16, -4,  4,   -2,  -13, -10, 0,   -32, -32, 0,   14,
  2,   -16, -14, -4,  -30, -16, 9,   6,   -2,  4,   0,   -9,  2,   22,  7,
  -16, -3,  16,  8,   2,   24,  27,  -2,  -8,  6,   -8,  -4,  24,  6,   -4,
  6,   23,  2,   -38, -9,  32,  -20, -20, 16,  28,  -14, -34, 4,   24,  -21,
  -12, 12,  6,   -18, -10, 10,  12,  1,   -6,  -16, -22, -19, -5,  -16, -26,
  2,   -1,  -12, -26, -12, 10,  -15, -34, 2,   11,  15,  5,   9,   23,  9,
  -10, 2,   0,   20,  25,  2,   6,   24,  10,  -11, -28, -8,  4,   -22, -20,
  4,   2,   -18, -28, -18, -10, -16, -22, -18, -6,  -10, -3,  7,   16,  16,
  -4,  -16, -6,  -1,  12,  28,  38,  30,  12,  -1,  -2,  6,   -7,  -17, -4,
  0,   -19, -9,  16,  24,  -6,  -36, -1,  12,  -22, -4,  32,  30,  8,   -19,
  6,   17,  -8,  2,   16,  -2,  17,  24,  1,   -4,  8,   -6,  -24, -34, 6,
  36,  -8,  -19, 12,  -8,  -35, -32, -10, 14,  0,   -10, 2,   4,   -6,  -18,
  -18, 1,   13,  0,   -6,  12,  19,  -14, -17, 0,   8,   -2,  -2,  13,  18,
  -11, -5,  25,  18,  -29, -26, 10,  16,  -18, -8,  28,  13,  -32, -18, 12,
  10,  2,   -3,  -12, -8,  12,  16,  -3,  -8,  20,  0,   -24, -4,  22,  9,
  -6,  -10, 14,  -2,  10,  14,  -21, -20, 10,  -2,  -6,  -7,  26,  10,  -32,
  -6,  16,  -12, -16, -13, 6,   0,   6,   26,  3,   -22, -15, -20, -13, 5,
  30,  26,  -2,  -14, -22, -22, -6,  4,   14,  12,  -10, -12, -36, -18, 2,
  -2,  18,  18,  -13, -3,  -12, 24,  10,  -18, 2,   1,   -7,  19,  18,  30,
  0,   -16, -6,  -6,  0,   8,   4,   -18, -2,  10,  0,   6,   2,   -22, -27,
  -30, 16,  11,  -12, 15,  8,   -22, -18, 10,  24,  -20, -26, 16,  14,  -6,
  14,  34,  8,   -28, -14, 11,  12,  4,   2,   4,   0,   -17, -14, 18,  30,
  12,  -2,  6,   2,   -20, -14, 20,  23,  6,   -9,  1,   6,   6,   8,   -12,
  -22, -5,  -5,  0,   2,   13,  6,   -20, -17, -4,  5,   -2,  -6,  -8,  -12,
  17,  38,  0,   -2,  -8,  5,   -2,  -10, 26,  38,  0,   -19, -10, 28,  20,
  -13, -16, -4,  -4,  -20, -1,  34,  19,  -25, -38, -22, -11, 5,   -15, -10,
  6,   -5,  -2,  4,   -17, 20,  -27, -3,  33,  -14, -4,  24,  -24, 34,  -28,
  3,   32,  -32, -6,  35,  -28, 30,  -22, -3,  12,  -28, 0,   26,  -26, 12,
  -18, -8,  10,  -2,  8,   12,  -15, -3,  -8,  5,   12,  2,   6,   10,  -4,
  -4,  4,   10,  -3,  -14, -1,  10,  4,   2,   5,   1,   -12, -14, -7,  4,
  6,   16,  -18, -31, 2,   4,   -16, 7,   27,  20,  -18, -22, 14,  0,   -18,
  9,   20,  1,   12,  18,  0,   -2,  8,   -8,  -21, -15, 20,  19,  -20, -1,
  17,  -14, -17, -11, -10, -14, -6,  2,   -6,  10,  28,  4,   -18, -18, 12,
  2,   -9,  19,  26,  14,  10,  4,   -2,  2,   14,  -5,  -22, 16,  27,  6,
  -18, 4,   16,  -26, -42, -24, -17, 12,  12,  -6,  -11, 2,   18,  -24, 0,
  5,   2,   11,  -4,  -10, 20,  2,   16,  -16, -12, 20,  6,   -14, -6,  9,
  -5,  -1,  8,   -16, 2,   16,  -24, 14,  -30, 10,  26,  -30, -4,  28,  -15,
  32,  -15, -20, 6,   8,   -2,  2,   8,   38,  6,   -26, -1,  17,  -17, -12,
  22,  24,  9,   2,   10,  -11, -28, -1,  18,  -18, 6,   14,  3,   18,  26,
  27,  33,  -20, 1,   4,   -4,  8,   2,   6,   19,  12,  -7,  -12, 2,   -14,
  -22, -12, -20, 32,  -2,  4,   15,  -10, 6,   10,  -15, 0,   4,   12,  -4,
  7,   18,  4,   20,  -40, 4,   -2,  -32, 4,   -13, -32, 25,  -28, 12,  0,
  -20, 6,   -10, -25, 4,   4,   16,  12,  8,   19,  21,  4,   -8,  -22, -26,
  4,   -12, -31, 3,   8,   -22, -14, -23, 12,  2,   -25, 8,   14,  -18, 24,
  6,   1,   18,  10,  -4,  -2,  11,  16,  20,  -10, -8,  14,  -7,  -22, 18,
  -30, 4,   5,   -26, 2,   10,  -14, 12,  -30, 0,   12,  2,   13,  6,   0,
  19,  19,  8,   -16, 14,  20,  -14, -6,  14,  35,  2,   -31, -4,  2,   -24,
  -18, -4,  0,   -20, 15,  50,  4,   -18, 6,   6,   10,  -21, 5,   28,  -7,
  1,   10,  -12, 12,  2,   -12, -26, -8,  23,  2,   -12, -10, 13,  10,  -2,
  7,   -8,  -14, 22,  -22, 7,   10,  10,  15,  -16, -14, 19,  -9,  7,   -21,
  -31, 4,   20,  -5,  -16, -2,  6,   0,   -13, -10, 6,   0,   -8,  -5,  4,
  38,  32,  -15, -28, 6,   20,  -1,  -14, -26, -6,  0,   -30, -28, 6,   -8,
  1,   -4,  -10, 8,   0,   -7,  12,  -10, 16,  20,  -6,  2,   24,  14,  -6,
  8,   -10, -9,  12,  -7,  -12, -4,  -13, 12,  -9,  -16, 9,   0,   -13, -8,
  6,   -12, 28,  21,  -17, 17,  30,  0,   21,  -31, 24,  18,  -23, 20,  14,
  -20, 22,  -24, -12, -18, -9,  8,   -27, -31, 12,  31,  -6,  -20, 20,  20,
  18,  22,  0,   20,  -10, -10, 17,  -1,  2,   15,  -4,  -20, 5,   10,  -10,
  -12, -14, -8,  4,   -8,  11,  -10, -9,  20,  2,   -6,  7,   13,  -4,  -10,
  14,  8,   9,   14,  -11, 0,   -12, 12,  6,   -33, -12, 1,   -11, -4,  -2,
  -4,  -5,  1,   -24, -26, 22,  12,  6,   -26, 12,  50,  -12, -18, 44,  -22,
  -8,  -10, 3,   38,  12,  -24, -5,  -22, 2,   0,   -2,  12,  0,   -8,  6,
  4,   10,  4,   -8,  -28, -4,  22,  4,   10,  -2,  -10, 12,  6,   4,   -1,
  -18, -10, 0,   -4,  10,  21,  -1,  -7,  -8,  -4,  12,  2,   -14, -25, -6,
  36,  13,  20,  -5,  -10, 12,  -18, -8,  31,  -6,  14,  -26, -4,  48,  16,
  -11, -18, -36, -17, -46, -26, 2,   -2,  15,  28,  6,   -2,  -4,  -5,  1,
  0,   0,   2,   -6,  14,  42,  12,  0,   5,   -20, -16, -10, -15, -4,  -10,
  -1,  4,   0,   16,  6,   -20, -22, -14, -2,  2,   7,   11,  7,   19,  30,
  14,  -1,  2,   -10, -22, -12, 14,  18,  15,  4,   -6,  -4,  -2,  -15, -29,
  -42, -10, 3,   -9,  18,  33,  2,   -16, -14, 18,  17,  -2,  20,  6,   -46,
  6,   -10, 0,   9,   -4,  1,   6,   -7,  14,  1,   -14, -13, 0,   -9,  -2,
  38,  -12, -6,  14,  -4,  2,   16,  -14, -6,  0,   -8,  10,  10,  -5,  10,
  -6,  -22, 25,  6,   -16, -3,  -3,  -12, 6,   31,  -10, 12,  4,   -15, 10,
  3,   -8,  28,  -46, 6,   22,  -14, 12,  16,  -32, -24, -15, 15,  -5,  10,
  12,  -16, 10,  -19, -24, 34,  -28, 8,   8,   -34, 40,  -28, -24, 34,  -36,
  10,  14,  -28, 42,  -22, -15, 23,  -14, 8,   14,  -14, 12,  -5,  -3,  8,
  0,   -6,  -6,  -4,  1,   5,   1,   -4,  -1,  -4,  -1,  4,   1,   2,   -6,
  -1,  1,   2,   11,  4,   0,   0,   -2,  16,  5,   -10, -3,  -4,  -2,  -2,
  -20, 6,   3,   -6,  25,  23,  -8,  11,  -2,  -10, 10,  -10, -16, 1,   -16,
  8,   24,  -12, 3,   8,   -9,  1,   2,   -6,  -8,  22,  -16, 8,   26,  -6,
  22,  -16, -38, 36,  -24, 0,   4,   -42, 30,  -16, -6,  10,  -16, 12,  2,
  -15, 12,  -10, 10,  -4,  4,   2,   14,  20,  -16, 9,   -13, 7,   12,  -26,
  -6,  0,   -15, 28,  50,  -4,  -6,  10,  28,  41,  -4,  -11, 6,   -16, 13,
  -4,  -26, -13, -10, 6,   -20, 6,   1,   -3,  -2,  -8,  5,   4,   10,  12,
  -17, 10,  24,  18,  8,   -12, 8,   -14, 14,  -1,  -30, -8,  -12, 5,   -4,
  -12, 18,  -13, -1,  9,   -20, 18,  6,   -2,  -4,  2,   31,  26,  3,   2,
  4,   -8,  7,   4,   -39, -18, 18,  -16, -30, -7,  -6,  -10, 25,  7,   -26,
  13,  -8,  6,   7,   -9,  -5,  1,   2,   2,   21,  -4,  0,   12,  -14, -1,
  12,  -18, -4,  -16, 4,   -2,  8,   12,  -19, 9,   0,   -16, 28,  -22, -6,
  20,  -24, 31,  38,  -30, 22,  0,   -24, 20,  -13, -1,  20,  -26, 10,  6,
  -8,  14,  -22, -8,  -15, 7,   10,  -14, 8,   -1,  -16, 32,  12,  -16, 24,
  -2,  -28, 2,   -14, 10,  24,  -15, 16,  -1,  5,   24,  -18, 6,   -2,  6,
  -18, 4,   12,  -13, 16,  -8,  -34, 29,  -21, 4,   -5,  -36, 33,  -20, -5,
  11,  -5,  4,   17,  6,   -6,  -4,  19,  -24, 14,  -10, -2,  19,  -24, 24,
  6,   -18, 19,  -12, -26, 2,   -4,  14,  8,   2,   -4,  11,  18,  7,   -4,
  -20, -4,  -10, -36, -44, -16, 6,   -10, -28, 4,   11,  22,  24,  6,   -2,
  10,  16,  -4,  3,   4,   10,  4,   -2,  -1,  7,   -6,  -6,  -36, -32, -4,
  4,   -11, -18, -4,  16,  21,  22,  6,   -6,  12,  10,  -5,  6,   5,   5,
  6,   -2,  0,   4,   -10, -16, -36, -35, -6,  0,   -16, -18, -2,  12,  34,
  24,  -2,  0,   14,  10,  4,   -27, -12, 35,  18,  -27, -36, -14, 6,   4,
  9,   -12, -12, 24,  18,  10,  0,   0,   4,   -13, -8,  8,   4,   9,   -2,
  -15, -8,  26,  14,  -28, -21, -12, 3,   14,  0,   -11, -4,  16,  26,  -3,
  -4,  4,   -2,  -6,  0,   -3,  2,   9,   -4,  -15, -8,  22,  11,  -33, -27,
  -9,  6,   17,  -1,  -18, -10, 30,  36,  -13, -8,  -24, -36, 16,  4,   -10,
  38,  21,  2,   24,  4,   3,   -6,  -4,  -16, -22, 2,   8,   8,   -1,  -6,
  15,  -16, 4,   -5,  -30, -18, 11,  -4,  4,   20,  24,  4,   24,  9,   -3,
  -4,  -4,  -12, -23, 0,   4,   10,  -4,  0,   4,   -10, 2,   -8,  -45, -9,
  4,   -2,  15,  14,  34,  22,  16,  18,  -10, -6,  6,   -24, -22, 4,   28,
  -5,  10,  2,   -17, 14,  -32, -16, 2,   -16, 2,   2,   -8,  17,  1,   -1,
  -9,  8,   -4,  2,   9,   -13, 17,  16,  2,   10,  -2,  -7,  0,   -8,  -12,
  -8,  0,   -13, 2,   5,   -6,  16,  -3,  -6,  -2,  8,   -4,  2,   14,  -18,
  19,  34,  -24, 28,  -8,  -27, 24,  -42, 12,  31,  -46, 12,  10,  -14, 24,
  -6,  8,   -3,  21,  -10, 16,  -13, 16,  -19, 13,  -11, 14,  -30, 30,  -37,
  28,  -16, 6,   -12, 22,  -33, 42,  -32, 30,  -18, 8,   -8,  23,  -22, 23,
  -26, 18,  -17, 8,   -5,  2,   -11, 9,   -14, 13,  -5,  1,   1,   2,   -3,
  11,  0,   4,   -2,  2,   0,   10,  -4,  -2,  -9,  -3,  -6,  0,   -7,  -2,
  -2,  4,   -1,  7,   2,   0,   42,  16,  -14, -16, 8,   -20, -8,  34,  -24,
  -16, 16,  6,   2,   8,   4,   -22, -6,  0,   -1,  0,   5,   -1,  10,  -10,
  30,  12,  -14, -12, 4,   -22, 0,   23,  -19, -16, 21,  0,   5,   12,  1,
  -18, -1,  1,   -2,  0,   4,   -1,  6,   -6,  33,  14,  -17, -6,  -2,  -21,
  -4,  27,  -36, -11, 28,  -8,  1,   29,  -14, -12, -32, 41,  -22, -8,  17,
  -20, 14,  3,   -1,  -2,  -4,  12,  -4,  0,   3,   -8,  22,  -26, 17,  -5,
  -10, 12,  -14, 6,   -8,  14,  2,   -14, 16,  -9,  4,   6,   -8,  0,   -6,
  9,   -3,  -2,  8,   -11, 18,  -21, 13,  -1,  -12, 18,  -20, 12,  2,   10,
  4,   -14, 14,  -7,  -2,  14,  -22, 18,  -21, 14,  6,   -29, 48,  -40, 23,
  6,   -14, 26,  -22, 0,   34,  -29, -24, 8,   -6,  -4,  8,   -1,  -22, 20,
  -4,  -2,  9,   -8,  1,   10,  -4,  8,   28,  -7,  -4,  14,  -6,  -9,  20,
  -28, -24, 10,  -2,  -8,  8,   0,   -17, 18,  -1,  0,   1,   6,   -11, 20,
  -4,  10,  26,  -6,  -15, 19,  -15, -6,  10,  -25, -42, 32,  -4,  -14, 20,
  -14, 1,   14,  9,   2,   19,  21,  30,  10,  7,   4,   -10, -13, -16, -30,
  -28, -20, -6,  -11, 12,  13,  10,  25,  22,  16,  7,   10,  -2,  -8,  2,
  -10, -6,  -4,  -2,  -2,  -2,  -12, 3,   -27, 0,   -20, 4,   -8,  18,  3,
  26,  16,  46,  4,   18,  7,   -15, -14, -12, -38, -25, -25, -2,  -13, 4,
  10,  6,   16,  24,  -1,  10,  -1,  8,   2,   -24, 2,   -9,  8,   -14, -12,
  -14, 19,  -2,  28,  -20, 18,  2,   19,  -3,  4,   -22, 2,   -8,  4,   -18,
  -2,  6,   -13, 21,  -18, 18,  -12, 16,  -6,  10,  -16, 38,  -32, 38,  -31,
  26,  -6,  8,   -17, 0,   -34, 26,  -21, -1,  -12, 0,   0,   26,  6,   1,
  2,   17,  7,   0,   -2,  -14, -6,  9,   -10, -6,  -2,  -20, 18,  11,  4,
  -30, 32,  -6,  20,  6,   -7,  -38, 30,  -6,  0,   -26, -4,  -6,  14,  16,
  -10, 1,   1,   26,  -2,  6,   -19, 21,  -29, 29,  -24, 8,   -6,  12,  -18,
  0,   -2,  11,  -10, -5,  -6,  -6,  26,  8,   2,   -22, 24,  8,   10,  -8,
  -12, -24, 17,  6,   -7,  -26, 4,   9,   3,   11,  -6,  -16, 16,  8,   -3,
  -4,  -4,  6,   33,  -14, -31, -7,  16,  6,   14,  -20, -21, 6,   44,  2,
  -16, -8,  -7,  11,  18,  -8,  -30, -4,  13,  6,   -2,  2,   -13, 12,  0,
  8,   -10, 6,   -3,  0,   -18, 14,  10,  4,   -10, -10, -6,  18,  20,  -10,
  -36, -4,  18,  11,  10,  -22, -26, 16,  38,  4,   -16, -10, -5,  19,  12,
  -10, -23, -2,  10,  4,   -6,  -28, 20,  10,  14,  -22, 5,   -14, 22,  13,
  -2,  -32, 6,   7,   3,   8,   -14, -4,  -4,  34,  -14, 4,   -10, 4,   -14,
  18,  -22, 14,  -13, 10,  -1,  -1,  14,  2,   4,   -22, 12,  -4,  3,   -7,
  8,   -44, 44,  -5,  18,  -24, 6,   -16, 26,  -2,  2,   -38, 16,  3,   10,
  4,   -6,  -14, 16,  8,   -4,  -7,  -5,  -16, 8,   22,  9,   3,   2,   -22,
  -30, 18,  -14, -24, -8,  -4,  0,   27,  40,  -11, 8,   20,  3,   2,   2,
  -23, -32, 5,   -2,  -6,  0,   2,   -3,  7,   8,   2,   -4,  -10, -4,  -4,
  2,   14,  18,  -10, 10,  22,  10,  0,   5,   -32, -36, 12,  -8,  -27, -4,
  -5,  -2,  32,  38,  -11, 6,   14,  2,   2,   5,   -20, -18, -40, 6,   -19,
  9,   18,  -10, 29,  -14, 36,  9,   12,  -6,  -14, -2,  -20, 6,   -14, -22,
  0,   2,   4,   14,  2,   4,   -12, 22,  -11, 2,   6,   -18, 16,  -12, 27,
  -10, 16,  -12, -2,  0,   -13, 4,   -16, -26, 7,   -4,  10,  10,  11,  1,
  5,   42,  -18, 8,   -6,  -20, 4,   -10, -3,  -20, 6,   7,   -18, 34,  -25,
  17,  10,  42,  -10, -4,  10,  -28, 8,   -10, -20, -40, 10,  2,   -3,  22,
  4,   4,   26,  16,  3,   -4,  -3,  -8,  -14, 5,   -18, 10,  -10, 3,   8,
  -7,  15,  -12, -6,  -26, 8,   1,   -5,  14,  -5,  6,   30,  29,  -2,  -6,
  -4,  -11, -12, 6,   -46, -7,  -18, 23,  -6,  12,  14,  -14, 22,  10,  -3,
  3,   -14, 10,  -24, 18,  13,  -27, 28,  -24, 16,  -14, 12,  -4,  2,   3,
  2,   -8,  13,  -10, 4,   -4,  -7,  9,   -14, 20,  -20, 14,  -8,  4,   0,
  -2,  2,   0,   -2,  4,   -4,  4,   4,   -6,  10,  -18, 22,  -22, 16,  -12,
  0,   0,   -2,  10,  -14, 11,  -5,  2,   -10, 22,  -30, 32,  -32, 34,  -33,
  19,  -20, 26,  -30, 28,  -22, 8,   4,   -6,  24,  -8,  -6,  19,  -17, 2,
  18,  -22, -32, 16,  2,   -18, 16,  0,   -26, 28,  26,  -12, -4,  14,  -13,
  4,   19,  -20, -10, 5,   5,   -4,  2,   -6,  -8,  3,   -10, 6,   -4,  -10,
  14,  4,   -6,  18,  24,  -16, 6,   17,  -22, -2,  18,  -32, -27, 18,  -2,
  -22, 29,  -8,  -14, 30,  20,  -18, 8,   9,   -18, 10,  4,   -14, -4,  11,
  -19, 26,  -32, 24,  -20, 12,  -6,  7,   -4,  -1,  9,   -8,  8,   -7,  11,
  -18, 20,  -20, 16,  -17, 10,  -5,  1,   6,   -7,  9,   -8,  14,  -12, 8,
  -10, 6,   -9,  7,   -7,  -2,  6,   -5,  11,  -15, 24,  -24, 26,  -16, 10,
  -4,  1,   -2,  -3,  2,   -9,  6,   -4,  4,   -18, 32,  -37, 40,  -36, 29,
  -20, 8,   -1,  -6,  -6,  -12, -12, -6,  -8,  -4,  5,   9,   14,  20,  21,
  13,  15,  9,   -10, -10, -20, -27, -28, -19, -20, -12, 10,  12,  22,  31,
  31,  22,  23,  14,  -12, -12, -18, -33, -26, -24, -24, -14, 10,  8,   14,
  28,  19,  22,  18,  12,  -8,  -4,  -10, -20, -10, -16, -10, -6,  6,   -3,
  8,   5,   5,   6,   3,   0,   4,   2,   -8,  -6,  -6,  28,  -15, 6,   -8,
  0,   10,  16,  0,   -36, 17,  -6,  12,  -4,  -8,  -30, 15,  34,  -9,  0,
  -12, 3,   12,  33,  -24, -28, -2,  8,   4,   4,   -18, -28, 28,  20,  14,
  -17, 4,   -12, 26,  14,  -18, -18, -15, 18,  -8,  18,  -28, 0,   6,   16,
  9,   -15, 5,   -14, 20,  -8,  4,   -12, -1,  7,   22,  -30, 24,  -13, 15,
  -4,  -14, 6,   -24, 32,  -21, 6,   -14, 2,   24,  -10, 16,  -20, 4,   14,
  2,   4,   -32, 12,  -6,  4,   12,  -26, 0,   0,   28,  -8,  -4,  9,   -22,
  30,  4,   -10, -13, -2,  6,   -10, 18,  -20, -15, 24,  -7,  13,  -4,  4,
  -8,  4,   22,  -30, 18,  -18, 2,   0,   2,   0,   -16, 21,  -17, 13,  4,
  -14, 12,  -10, -10, 2,   10,  12,  -2,  15,  -12, 10,  21,  -6,  -18, -19,
  -3,  -12, 8,   -6,  -34, 12,  25,  23,  9,   6,   -4,  4,   35,  -9,  -36,
  -20, -13, 0,   2,   -5,  -29, 2,   44,  13,  15,  -6,  0,   5,   19,  5,
  -46, -4,  -12, 8,   -2,  -2,  -10, -6,  35,  -3,  8,   -8,  4,   -2,  6,
  4,   -18, 4,   1,   12,  12,  8,   -16, 8,   -14, 1,   -3,  -18, -25, -5,
  20,  -8,  21,  0,   4,   23,  36,  -2,  -16, 0,   -19, -6,  0,   -29, -42,
  6,   10,  6,   15,  12,  -5,  34,  38,  -8,  -3,  -11, -9,  -16, 10,  -38,
  -25, 4,   0,   12,  5,   16,  -13, 34,  8,   4,   -4,  -6,  -4,  -10, 9,
  -20, 3,   -6,  3,   1,   2,   3,   4,   -1,  18,  -28, 21,  -12, 16,  -10,
  -1,  -14, -10, 28,  -16, 6,   -14, 12,  -5,  30,  -6,  -14, -3,  14,  4,
  -8,  7,   -35, 14,  5,   15,  -29, 6,   4,   -4,  30,  -9,  -7,  -14, 31,
  -9,  -1,  -4,  -15, -2,  18,  3,   -22, 5,   4,   13,  -7,  22,  -34, 18,
  2,   6,   -9,  -11, 13,  -23, 32,  -26, 13,  -13, 11,  12,  15,  -8,  -3,
  -3,  -6,  0,   11,  -22, -22, 10,  7,   2,   13,  -1,  -18, 32,  26,  -12,
  -11, 0,   -20, 3,   24,  -40, -26, 14,  11,  1,   24,  -5,  -26, 40,  23,
  -15, -9,  -2,  -22, 4,   26,  -34, -18, 15,  5,   4,   18,  -4,  -21, 21,
  12,  -14, 0,   -6,  -9,  2,   14,  -10, -2,  6,   -2,  3,   4,   0,   -5,
  -14, 5,   -6,  -1,  4,   0,   -9,  18,  24,  -8,  7,   3,   -10, 2,   12,
  -29, -32, 8,   -5,  -8,  16,  -4,  -12, 36,  36,  -8,  2,   12,  -22, 7,
  10,  -39, -34, 6,   2,   -15, 24,  -10, -6,  36,  29,  -5,  -4,  14,  -20,
  10,  2,   -28, -19, 3,   6,   -11, 16,  -8,  0,   17,  8,   -1,  -6,  8,
  -11, 8,   -2,  -6,  -8,  14,  -16, 12,  0,   -5,  6,   -6,  12,  -20, 24,
  -17, 0,   9,   -12, 13,  -16, 22,  -26, 17,  4,   -15, 18,  -20, 16,  -20,
  22,  -14, -11, 22,  -24, 26,  -14, 17,  -16, 8,   16,  -26, 28,  -29, 11,
  -12, 10,  -2,  -18, 26,  -28, 28,  -6,  7,   -4,  0,   14,  -19, 20,  -20,
  2,   -2,  0,   1,   -8,  10,  -10, 10,  -2,  7,   -15, 20,  -20, 18,  -12,
  6,   1,   -11, 22,  -30, 31,  -28, 20,  -11, 5,   4,   -15, 24,  -27, 26,
  -18, 10,  -12, 6,   2,   -10, 14,  -16, 11,  -6,  18,  -18, 14,  -8,  4,
  0,   0,   0,   -20, 24,  -24, 22,  -16, 11,  -10, 5,   16,  -23, 24,  -24,
  20,  -15, 13,  -7,  -8,  14,  -16, 16,  -15, 12,  -10, 5,   5,   -7,  12,
  -10, 9,   -8,  6,   -3,  -10, 13,  -20, 19,  -17, 15,  -10, 6,   12,  -16,
  25,  -24, 21,  -18, 13,  -8,  -14, 19,  -28, 28,  -24, 21,  -15, 9,   13,
  -20, 27,  -28, 25,  -21, 16,  -10, -10, 18,  -24, 25,  -23, 20,  -16, 9,
  6,   -13, 17,  -18, 17,  -14, 12,  -8,  -3,  6,   -8,  9,   -9,  8,   -7,
  4
};

static const int32_t mdt8x8_mode11[4096] = {
  1,   3,   6,   6,   7,   8,   7,   8,   1,   4,   8,   10,  12,  12,  13,
  14,  2,   6,   11,  15,  16,  17,  19,  20,  3,   8,   12,  17,  20,  22,
  24,  22,  2,   8,   14,  18,  23,  25,  26,  24,  2,   8,   14,  20,  24,
  25,  26,  24,  3,   8,   14,  20,  22,  24,  24,  23,  4,   10,  14,  16,
  20,  21,  22,  22,  2,   6,   11,  14,  14,  13,  10,  6,   2,   13,  24,
  26,  23,  18,  14,  10,  6,   22,  32,  34,  28,  20,  12,  4,   10,  22,
  30,  30,  22,  10,  2,   -4,  7,   16,  18,  14,  7,   -4,  -9,  -10, 2,
  4,   0,   -6,  -9,  -14, -15, -13, 0,   -6,  -14, -18, -20, -19, -19, -17,
  -2,  -9,  -16, -19, -20, -20, -20, -18, -4,  -10, -18, -22, -20, -12, -10,
  -12, -3,  -12, -21, -21, -14, -14, -18, -20, 0,   -3,  -6,  0,   1,   -10,
  -20, -20, 6,   14,  23,  27,  15,  -4,  -16, -18, 11,  28,  43,  40,  20,
  -2,  -12, -16, 11,  26,  34,  28,  14,  0,   -10, -13, 8,   16,  15,  10,
  5,   0,   -4,  -8,  6,   6,   4,   2,   1,   0,   -2,  -5,  -3,  -8,  -10,
  -6,  -2,  -6,  -17, -17, 0,   4,   10,  9,   -4,  -17, -24, -22, 10,  29,
  38,  25,  -8,  -24, -22, -14, 16,  34,  34,  12,  -14, -20, -8,  -2,  10,
  12,  -1,  -17, -15, -4,  6,   4,   0,   -12, -30, -30, -2,  16,  13,  6,
  -4,  -15, -22, -12, 13,  22,  16,  12,  -2,  -6,  -2,  10,  18,  16,  14,
  14,  -7,  -16, -23, -26, -22, -18, -11, 1,   -7,  -16, -26, -28, -26, -14,
  2,   7,   -2,  -3,  -4,  -8,  -10, 6,   20,  18,  2,   6,   11,  11,  16,
  27,  25,  18,  0,   -6,  -4,  10,  28,  32,  20,  10,  -6,  -24, -30, -9,
  12,  14,  6,   1,   -8,  -24, -28, -20, -12, -8,  -6,  -6,  -8,  -14, -14,
  -16, -19, -16, -8,  -8,  2,   6,   12,  8,   -4,  -10, -6,  -2,  6,   22,
  28,  6,   -18, -16, -8,  -7,  12,  31,  26,  -2,  -18, -6,  -3,  -8,  12,
  10,  -11, -11, 8,   16,  -1,  -10, 2,   -19, -36, -2,  36,  20,  -8,  -14,
  -6,  -22, -14, 21,  33,  4,   -19, -16, -4,  0,   21,  30,  10,  -12, -20,
  -15, 8,   22,  30,  18,  -2,  -12, -11, -11, 0,   2,   -8,  -22, -20, -6,
  2,   4,   5,   8,   -5,  -14, -4,  10,  8,   -2,  4,   2,   2,   16,  32,
  19,  -6,  -18, -6,  -20, -9,  32,  44,  7,   -26, -24, -16, -36, -22, 12,
  14,  -14, -26, -10, -12, -23, -16, -14, -20, -18, 0,   12,  -1,  4,   3,
  -11, -15, 2,   20,  21,  6,   12,  10,  5,   9,   18,  20,  17,  -10, -26,
  -32, -23, -8,  4,   9,   14,  -8,  -21, -24, -14, 2,   19,  28,  24,  3,
  11,  8,   -2,  2,   24,  33,  21,  15,  30,  15,  -9,  -15, -2,  8,   2,
  12,  14,  -4,  -18, -22, -25, -20, -11, 0,   -7,  -10, -6,  -4,  -18, -23,
  -12, 0,   0,   8,   19,  16,  0,   -10, -8,  8,   16,  26,  29,  20,  8,
  2,   -4,  0,   -5,  -16, -20, -10, -2,  -12, -18, 2,   -6,  -8,  4,   15,
  0,   -24, -24, 0,   -8,  4,   30,  30,  2,   -12, -3,  -6,  -13, -3,  8,
  8,   12,  20,  18,  -6,  -8,  -12, -28, -20, 16,  36,  18,  8,   16,  2,
  -25, -22, 4,   12,  -2,  16,  34,  25,  3,   -6,  -10, -18, -20, 15,  26,
  21,  12,  0,   -14, -23, -22, 0,   2,   6,   4,   -17, -26, -10, 3,   7,
  18,  18,  -9,  -36, -22, 2,   5,   16,  30,  16,  -19, -22, 8,   16,  4,
  12,  20,  4,   -16, 0,   19,  12,  5,   1,   8,   6,   -5,  -12, -10, 6,
  18,  2,   18,  24,  -1,  -38, -34, 8,   28,  6,   22,  20,  -8,  -34, -22,
  11,  22,  6,   8,   -2,  -12, -9,  2,   10,  11,  6,   4,   -8,  -10, 12,
  28,  8,   -6,  11,  16,  -7,  -22, 1,   16,  1,   -1,  13,  23,  8,   -9,
  -18, -21, -4,  18,  -3,  -2,  14,  22,  -20, -42, 2,   34,  -23, -34, 10,
  38,  -4,  -28, 8,   28,  -22, -26, 5,   14,  4,   0,   2,   6,   -2,  10,
  6,   -11, -6,  4,   -6,  -7,  14,  25,  10,  -10, -12, -10, -8,  -7,  -7,
  -8,  2,   15,  18,  7,   -13, -22, -8,  -22, -22, 12,  32,  12,  -24, -34,
  1,   -4,  -16, -10, 19,  18,  -12, -21, 10,  25,  7,   -21, -2,  17,  8,
  3,   2,   6,   7,   4,   0,   -3,  7,   18,  -22, -36, -4,  27,  -3,  -29,
  -4,  19,  -24, -28, 6,   16,  -15, -26, 0,   16,  -6,  7,   14,  -2,  -12,
  -2,  10,  12,  -6,  -14, -9,  14,  34,  30,  18,  14,  -14, -30, -14, 8,
  4,   -4,  6,   16,  -10, -14, 2,   2,   -26, -27, -9,  -1,  6,   13,  8,
  1,   0,   -2,  -14, -14, 14,  11,  -14, -6,  28,  22,  -6,  -10, 10,  6,
  -14, -19, 0,   10,  7,   5,   14,  22,  10,  -23, -35, -11, 12,  17,  21,
  36,  24,  -8,  -22, -10, 9,   16,  1,   11,  22,  16,  -3,  9,   37,  30,
  -4,  -6,  0,   -12, -24, -6,  14,  12,  -1,  -6,  -12, -14, -5,  -12, -28,
  -17, 6,   12,  7,   14,  22,  0,   -18, -2,  4,   13,  11,  4,   -2,  8,
  23,  23,  -8,  -10, 0,   -14, -32, -4,  23,  12,  -18, -24, 0,   10,  -2,
  -8,  -14, -18, -9,  -3,  18,  33,  32,  7,   -24, -29, -26, -54, -39, 8,
  13,  -6,  8,   17,  -14, -24, 6,   30,  5,   -26, -5,  23,  6,   11,  19,
  18,  1,   -22, -13, 8,   2,   -8,  -13, -2,  8,   2,   -4,  -7,  -16, -28,
  -10, 5,   -4,  2,   8,   -5,  -18, -6,  32,  25,  -14, -7,  10,  3,   -10,
  -2,  10,  13,  4,   1,   2,   -3,  -4,  -16, -28, -12, 11,  7,   -6,  -12,
  -8,  -12, -15, -26, -18, 20,  24,  4,   0,   11,  3,   -17, 4,   35,  14,
  -10, 16,  26,  0,   -8,  18,  15,  -18, -18, 27,  17,  -32, -24, 5,   -14,
  -25, -6,  24,  12,  -24, -16, 5,   -4,  6,   15,  13,  12,  9,   12,  18,
  22,  26,  20,  -1,  0,   4,   -1,  -1,  10,  10,  4,   -7,  -11, -12, -22,
  -24, -16, -14, -12, -12, -18, 7,   28,  18,  1,   -4,  -3,  -2,  -2,  -6,
  -9,  7,   14,  -4,  -12, 22,  29,  -14, -43, 0,   30,  3,   -22, 12,  13,
  -2,  -11, 0,   22,  12,  -23, -16, -22, 14,  15,  -8,  14,  14,  -23, -12,
  -4,  7,   -18, -10, 24,  8,   -24, 13,  22,  -12, -32, 8,   25,  0,   -16,
  16,  13,  -10, 0,   20,  10,  -1,  -4,  -8,  -6,  10,  17,  3,   -10, -20,
  -18, -16, -14, 14,  16,  -4,  -10, -12, -6,  -4,  -9,  -14, -3,  5,   0,
  4,   26,  30,  6,   -41, 4,   27,  -12, 0,   38,  40,  13,  -20, 24,  18,
  -32, -13, 19,  12,  -2,  -2,  -3,  -8,  -8,  -8,  -8,  -2,  0,   -4,  -26,
  -6,  26,  3,   -20, 10,  14,  2,   -3,  16,  18,  0,   -14, -3,  13,  26,
  -3,  -28, -18, 2,   15,  6,   0,   -6,  4,   7,   -20, -7,  32,  28,  4,
  -37, 11,  37,  -22, -14, 32,  29,  20,  -11, -2,  3,   -14, -6,  6,   -6,
  4,   18,  -14, -20, 13,  1,   -22, -29, -16, 12,  -5,  2,   20,  -2,  -18,
  -11, -1,  2,   0,   2,   -3,  2,   9,   13,  18,  4,   -8,  -19, -16, 10,
  20,  6,   12,  7,   -2,  -26, -36, -3,  20,  -10, -18, 10,  28,  -4,  -8,
  16,  8,   -23, -25, 12,  12,  1,   22,  6,   -24, -12, 6,   18,  -18, -22,
  0,   -10, -20, -6,  0,   9,   6,   -11, -18, 3,   14,  -9,  -24, -8,  20,
  14,  10,  20,  14,  4,   6,   0,   -13, 0,   26,  10,  -16, 18,  35,  10,
  -28, -15, 8,   -11, -28, 34,  28,  -30, -30, 20,  12,  -13, -6,  26,  22,
  -6,  0,   11,  0,   -4,  5,   -4,  -7,  8,   5,   -14, -4,  11,  6,   2,
  3,   -8,  -12, -2,  10,  8,   -11, 14,  18,  -2,  -2,  6,   12,  5,   -26,
  -18, -12, 22,  6,   -29, 10,  18,  -26, -34, -22, 24,  -6,  -28, 22,  21,
  -18, -10, 6,   6,   -10, 7,   20,  2,   -12, 20,  31,  22,  14,  16,  2,
  -12, -12, -12, -30, -30, -17, -8,  0,   -1,  -6,  -6,  -3,  4,   -2,  1,
  0,   6,   17,  10,  32,  30,  4,   20,  0,   -18, 10,  -15, -18, -24, -23,
  6,   -2,  -22, -4,  -11, -4,  0,   0,   -4,  6,   8,   6,   7,   28,  36,
  22,  12,  14,  8,   2,   -12, -22, -34, -20, 4,   4,   -16, -18, 12,  18,
  6,   -26, -25, 30,  37,  -4,  -15, -9,  12,  -2,  -8,  10,  -2,  -8,  -20,
  -3,  16,  2,   2,   -12, -28, 6,   -4,  14,  -2,  -24, 3,   15,  6,   13,
  -5,  0,   -2,  -8,  5,   18,  15,  1,   -8,  -7,  7,   14,  1,   -20, -30,
  -13, 10,  10,  -14, -16, 6,   -6,  -26, -6,  21,  10,  -29, -24, 22,  40,
  24,  13,  16,  11,  -20, -5,  24,  -6,  -11, 27,  38,  20,  -32, 3,   30,
  -26, -16, 28,  30,  12,  -22, -4,  8,   -10, -12, -5,  0,   4,   2,   -11,
  2,   16,  -6,  -6,  -2,  7,   -1,  -8,  14,  -2,  -9,  28,  16,  8,   -18,
  2,   16,  -21, -14, 28,  20,  6,   -19, -2,  12,  0,   -10, -10, 10,  6,
  -9,  -12, 10,  24,  0,   -24, 9,   17,  -4,  -18, 14,  12,  -26, -11, -14,
  4,   10,  -6,  0,   2,   0,   4,   -12, -10, 0,   10,  -10, -4,  17,  4,
  19,  0,   -24, 4,   -2,  3,   0,   -26, 16,  4,   8,   8,   -6,  4,   0,
  -14, -15, -15, 12,  2,   -2,  -5,  12,  36,  4,   1,   -22, -5,  25,  -16,
  -12, 38,  36,  17,  -26, 10,  33,  -29, -42, -2,  -18, 14,  30,  -14, -3,
  20,  4,   8,   -15, -10, -8,  -6,  -2,  -6,  4,   -6,  26,  -8,  -16, 34,
  -16, -12, 26,  -31, 42,  -8,  -10, 32,  -28, 0,   40,  -30, 12,  -14, -12,
  4,   -6,  -2,  14,  2,   -3,  4,   2,   -2,  12,  -12, -12, 10,  -6,  7,
  12,  2,   -6,  2,   1,   -11, -9,  -15, -4,  -6,  -8,  22,  20,  -16, 30,
  8,   -10, 18,  8,   -12, 11,  16,  6,   0,   -8,  -14, -4,  -8,  -10, 12,
  -17, 2,   6,   -13, 14,  6,   -19, -1,  10,  4,   6,   20,  0,   -2,  19,
  -10, 44,  -18, -27, 24,  -32, -15, 40,  -22, 39,  -12, -18, 24,  -10, -10,
  14,  -18, 11,  2,   1,   14,  14,  -4,  -4,  8,   -4,  4,   -5,  -17, -7,
  -8,  4,   23,  18,  8,   -18, 5,   16,  -20, -11, 36,  -5,  -6,  -3,  -7,
  -1,  1,   -5,  8,   -14, -4,  14,  -2,  -3,  20,  -8,  -32, 6,   0,   -8,
  11,  2,   -8,  4,   5,   5,   5,   -10, -6,  3,   -7,  1,   34,  -28, 11,
  25,  -25, 12,  21,  -36, 0,   -37, 7,   21,  -22, 11,  6,   -36, 2,   -9,
  -1,  -6,  -3,  2,   -16, 6,   38,  -14, -8,  6,   -2,  10,  30,  0,   -3,
  -28, 15,  20,  -30, -6,  -14, -37, 21,  -27, 10,  6,   -18, 14,  2,   -18,
  19,  -12, -10, 6,   8,   8,   28,  13,  -12, 6,   2,   10,  -12, -22, -4,
  -13, -8,  -4,  5,   2,   -13, 9,   -4,  -18, 24,  -22, -5,  4,   -4,  20,
  27,  8,   11,  -14, 12,  23,  -17, -30, 8,   -1,  -30, 18,  3,   -8,  0,
  -5,  22,  49,  17,  18,  -7,  -8,  14,  -14, -30, -17, -26, 7,   -4,  -4,
  7,   -7,  4,   4,   -20, 1,   4,   -4,  -2,  8,   27,  32,  20,  -7,  4,
  0,   -2,  0,   -25, -25, 4,   -8,  -3,  6,   -2,  -4,  -3,  -10, -12, 10,
  -8,  -8,  6,   8,   30,  36,  10,  24,  -6,  -10, 16,  -10, -40, -16, 5,
  -39, 4,   15,  -20, 18,  27,  -14, 2,   7,   -2,  -3,  4,   -24, -12, 8,
  0,   30,  -6,  -6,  18,  -9,  2,   10,  -8,  -14, -2,  3,   -10, 18,  16,
  -14, 3,   -8,  6,   6,   -6,  -11, -10, 2,   6,   24,  -9,  -8,  18,  -13,
  0,   6,   -14, 2,   -7,  7,   -6,  15,  23,  -28, 3,   -27, 14,  17,  -36,
  10,  0,   -34, 46,  4,   15,  10,  -24, -30, 4,   10,  7,   -7,  -14, -6,
  23,  30,  -9,  -22, 14,  -3,  10,  4,   -10, 6,   0,   -10, 14,  0,   12,
  6,   -24, -23, 6,   10,  -4,  0,   -20, -6,  32,  16,  -10, -4,  -12, 10,
  8,   -4,  -2,  4,   0,   2,   9,   -6,  21,  10,  -37, -14, 4,   -6,  20,
  -44, -23, 20,  25,  23,  -8,  -30, 4,   42,  20,  -28, -15, 22,  16,  -8,
  -20, -16, -24, 18,  22,  -24, -14, 14,  4,   6,   0,   -4,  -1,  1,   6,
  2,   3,   26,  11,  -19, -11, 20,  7,   -18, -10, -24, -16, 22,  7,   -16,
  -10, 14,  7,   -4,  7,   -2,  -4,  6,   0,   5,   2,   20,  8,   -22, -2,
  13,  -6,  -8,  -12, -24, -17, 28,  18,  -30, -4,  27,  -2,  26,  -24, -13,
  32,  -18, -4,  28,  -40, 43,  -6,  -12, 22,  -20, 0,   32,  -20, 12,  -4,
  -12, 4,   2,   -13, 8,   10,  -6,  -2,  -2,  6,   2,   -2,  6,   -10, 10,
  4,   1,   3,   -6,  9,   5,   -15, -4,  0,   -2,  -12, 8,   -2,  -18, 25,
  -28, 9,   12,  -18, 22,  6,   -21, 27,  -18, 13,  8,   -20, 1,   11,  -9,
  -16, 11,  8,   17,  26,  0,   10,  8,   -25, 0,   -19, -42, -22, -16, -22,
  -6,  8,   4,   23,  24,  27,  16,  18,  4,   16,  -6,  -19, -2,  -8,  -16,
  10,  -18, -12, 6,   -16, -9,  -12, -10, -4,  -7,  8,   16,  16,  32,  21,
  14,  15,  7,   9,   -12, -30, -20, -22, -24, -2,  -10, -18, 21,  6,   6,
  18,  8,   -1,  5,   10,  11,  4,   -11, -2,  4,   -14, 4,   22,  -12, 1,
  6,   1,   5,   7,   4,   -24, 4,   0,   1,   2,   -4,  -4,  1,   -4,  30,
  -20, 7,   2,   -14, 12,  -16, 32,  28,  -36, 28,  -2,  -22, 43,  -42, 8,
  32,  -23, 17,  4,   -18, 22,  -24, 7,   15,  -10, -3,  1,   -6,  -2,  2,
  14,  -16, 7,   10,  -8,  4,   10,  -5,  -12, -11, -10, 11,  -12, -18, 19,
  -11, -36, 24,  4,   0,   18,  8,   -2,  12,  31,  -12, -6,  -2,  -16, -3,
  -10, -4,  -2,  -7,  4,   12,  -4,  -2,  16,  -10, -24, 32,  -12, 2,   15,
  -6,  10,  -5,  34,  9,   -30, 6,   -14, -22, 13,  -20, 12,  12,  2,   26,
  10,  4,   21,  -8,  -26, 18,  -20, -20, 16,  -13, -25, 20,  14,  -16, 4,
  -11, -1,  6,   -6,  22,  -18, 8,   12,  10,  0,   0,   -2,  -8,  4,   26,
  -40, 9,   -6,  -18, 32,  -28, 22,  44,  -35, 30,  4,   -20, 30,  -28, 8,
  14,  -2,  0,   0,   -1,  -6,  -1,  0,   -28, 15,  -20, 0,   12,  -11, 18,
  -7,  -16, 18,  2,   1,   4,   -8,  1,   -8,  6,   -3,  -8,  0,   4,   -1,
  -4,  10,  -24, 26,  -10, -8,  5,   -18, 28,  -18, -38, 30,  -28, 11,  32,
  -35, 34,  -20, -27, 30,  -8,  -10, 2,   -22, 23,  -8,  -2,  -3,  2,   -3,
  9,   7,   -10, 2,   11,  -10, 1,   4,   0,   0,   -4,  7,   -3,  15,  -4,
  -8,  -6,  -10, 16,  -6,  -27, 11,  -9,  4,   22,  -5,  2,   -16, -5,  17,
  -4,  -6,  -4,  -10, 6,   12,  40,  -18, -9,  2,   -24, 8,   19,  -16, -20,
  -4,  26,  8,   17,  -6,  -32, 9,   1,   8,   -25, -18, -6,  7,   25,  4,
  14,  -2,  8,   25,  -5,  -10, 7,   -22, -21, -1,  2,   -14, 12,  -4,  -18,
  14,  8,   12,  -8,  -6,  -7,  16,  14,  12,  2,   -20, 3,   28,  -14, -4,
  -14, -24, -2,  18,  -4,  -28, 15,  10,  -18, 33,  -16, 38,  -6,  -6,  -4,
  -32, 12,  -12, -14, -20, -11, 12,  24,  18,  1,   2,   31,  0,   22,  -18,
  -27, 3,   -16, 12,  0,   -8,  -2,  8,   10,  -4,  7,   -5,  -16, 6,   -15,
  8,   10,  -2,  13,  -15, 10,  15,  15,  -12, -25, 2,   -14, 15,  14,  -42,
  -1,  14,  12,  28,  -22, 20,  25,  -2,  14,  -6,  -25, 5,   -2,  -6,  -10,
  0,   -24, 24,  10,  -18, 18,  -19, -18, 45,  -6,  -19, 0,   -12, 15,  1,
  -24, -10, -12, 17,  10,  -4,  -8,  4,   18,  11,  -8,  4,   -9,  3,   7,
  -8,  -16, 16,  2,   -8,  0,   -4,  8,   0,   -15, -22, 0,   12,  8,   4,
  -14, 5,   48,  -2,  16,  -12, -32, 25,  -16, 8,   0,   -32, 17,  5,   2,
  13,  -25, 15,  -24, 17,  -14, -19, 18,  16,  12,  2,   -2,  7,   8,   26,
  -20, -38, -6,  -10, 2,   4,   -20, -14, 14,  38,  8,   0,   -18, 6,   8,
  4,   -2,  -18, -4,  11,  4,   0,   -2,  9,   -10, -12, 4,   -16, 14,  -8,
  -9,  -10, 12,  40,  -2,  6,   -8,  -8,  27,  7,   -24, -24, -24, 23,  26,
  -10, -18, 2,   7,   17,  16,  -22, -22, 24,  -18, 2,   18,  -19, 24,  -32,
  -2,  -2,  17,  -15, -6,  2,   0,   20,  21,  -23, 2,   0,   9,   4,   -12,
  -4,  -6,  14,  4,   0,   3,   -14, 26,  -15, -12, 2,   -6,  -12, 6,   -3,
  -4,  11,  22,  -15, 12,  10,  -1,  12,  -20, 4,   0,   5,   -10, -6,  -4,
  -12, 26,  -8,  -41, 36,  -17, 2,   30,  -34, 18,  -14, -20, -5,  6,   4,
  -3,  -4,  24,  22,  30,  12,  -7,  -8,  11,  0,   -40, -25, -18, -21, 12,
  8,   -18, 6,   28,  21,  2,   17,  -10, 0,   12,  -5,  -7,  -8,  3,   4,
  -7,  0,   1,   -6,  -12, -13, -11, -18, 18,  4,   -18, 16,  26,  26,  19,
  12,  -16, -8,  20,  -9,  -36, -18, -22, 2,   6,   5,   -14, -2,  34,  0,
  -12, 2,   10,  3,   -14, 14,  1,   -28, 21,  -2,  -24, 8,   7,   -18, -2,
  37,  -22, 4,   19,  -4,  -13, 26,  -4,  -28, 8,   3,   -20, 15,  -6,  -6,
  -2,  13,  4,   4,   -8,  6,   0,   2,   -5,  17,  -24, 0,   16,  -14, -7,
  16,  -2,  -33, 25,  2,   -24, 20,  10,  -30, 14,  28,  -20, 6,   16,  -20,
  -2,  24,  -16, -12, 10,  -1,  0,   12,  -16, 7,   -8,  10,  -23, 12,  -27,
  16,  -4,  10,  -4,  -3,  -5,  30,  -16, 30,  -40, 30,  -25, 20,  -8,  -8,
  -27, 16,  -18, 20,  -22, 4,   -10, 18,  18,  -1,  10,  -10, 20,  -8,  12,
  -24, -4,  -19, 2,   -8,  -5,  2,   8,   0,   18,  10,  0,   6,   5,   -2,
  -22, 17,  -18, -8,  14,  -26, 24,  -10, 13,  -1,  8,   4,   5,   2,   13,
  2,   -16, -14, -6,  -20, 4,   -20, -4,  -6,  27,  2,   44,  -10, 31,  -5,
  19,  0,   -2,  -44, -8,  -32, 1,   -21, 6,   -10, 19,  22,  32,  7,   24,
  -6,  7,   2,   -10, -30, -8,  -30, 3,   -8,  8,   -4,  27,  -2,  30,  3,
  13,  -10, 2,   -3,  -6,  -6,  0,   -16, 7,   -3,  5,   0,   6,   -22, 14,
  -6,  -8,  10,  -14, 2,   7,   20,  -3,  5,   14,  -10, 14,  0,   -19, -17,
  -4,  -11, -9,  -3,  0,   -8,  34,  -10, 38,  -12, 26,  -6,  2,   7,   -6,
  -30, 7,   -38, 25,  -36, 27,  -12, 18,  0,   33,  -10, 16,  -6,  4,   -10,
  8,   -28, 4,   -14, 2,   0,   -8,  18,  0,   8,   5,   -4,  12,  -14, 16,
  -15, 26,  -25, 14,  1,   -10, 15,  -8,  -2,  -26, 18,  -2,  -14, 16,  -20,
  10,  4,   18,  -14, 7,   0,   6,   -5,  10,  -16, 7,   -11, 12,  -8,  -5,
  8,   -12, 11,  -19, 31,  -30, 22,  -9,  4,   -2,  4,   -10, 15,  -22, 34,
  -36, 24,  -9,  -7,  1,   4,   -4,  -3,  -2,  14,  -24, 27,  -10, 14,  -12,
  11,  2,   -18, 28,  -24, -17, 14,  -10, 14,  -12, 17,  -18, 16,  6,   12,
  -28, 24,  -30, 15,  -2,  -6,  -16, 5,   12,  -4,  13,  -5,  -9,  9,   26,
  -22, 10,  -27, 16,  -18, 22,  -14, 8,   -9,  16,  4,   8,   -9,  6,   -8,
  -20, 24,  -22, 4,   -16, 22,  -24, 21,  1,   8,   -23, 36,  -28, 14,  -2,
  -8,  -16, 22,  -14, 3,   0,   1,   -7,  8,   4,   10,  -22, 26,  -18, 4,
  8,   -12, -29, 18,  -6,  1,   -8,  18,  -33, 28,  22,  -1,  -17, 25,  -18,
  6,   16,  -18, -16, -4,  14,  -20, 18,  -18, 2,   -1,  21,  -12, 18,  -20,
  22,  -4,  3,   10,  12,  -20, 0,   12,  -17, -1,  8,   -20, -26, 30,  -10,
  -5,  12,  3,   -11, 21,  14,  -16, 0,   17,  -24, 14,  -4,  -6,  11,  -23,
  30,  -28, 32,  -24, 18,  -8,  16,  -14, 16,  -25, 14,  -19, 8,   -8,  -10,
  5,   -4,  16,  -2,  16,  -3,  9,   -2,  7,   -10, -8,  -12, -6,  -10, -6,
  6,   -12, 19,  -4,  25,  -8,  21,  3,   8,   -5,  0,   -11, -10, -2,  -13,
  -6,  -13, 16,  -20, 31,  -20, 28,  -12, 17,  -12, 20,  -25, 25,  -27, 18,
  -17, 3,   2,   4,   10,  -8,  -5,  -11, 6,   -6,  8,   -22, -2,  2,   30,
  6,   2,   4,   2,   18,  16,  -22, -32, -18, 2,   -4,  -4,  -23, -14, 21,
  46,  15,  5,   -2,  8,   18,  22,  -30, -38, -22, 1,   0,   -6,  -17, -20,
  30,  26,  22,  -4,  -2,  -3,  22,  2,   -7,  -33, -4,  -4,  6,   -3,  -6,
  -7,  11,  8,   4,   -1,  -4,  9,   -7,  -2,  10,  -6,  1,   -12, -3,  -14,
  12,  -4,  -12, 4,   8,   24,  5,   16,  -20, 12,  11,  0,   -23, -30, -10,
  -5,  12,  -10, -14, -2,  37,  32,  14,  -8,  0,   2,   20,  -2,  -38, -31,
  -14, 18,  -10, 10,  -30, 11,  28,  30,  8,   -10, 2,   0,   16,  -1,  -26,
  -16, -9,  -2,  12,  -18, 10,  -18, 28,  -6,  10,  11,  0,   2,   -12, 4,
  5,   -12, 0,   -16, -4,  4,   21,  -10, -7,  17,  -2,  20,  16,  -20, -20,
  10,  8,   -14, -6,  -28, -19, 26,  24,  -12, -4,  12,  16,  36,  16,  -26,
  -26, 14,  2,   -6,  -21, -32, -19, 34,  8,   2,   -12, 14,  17,  28,  10,
  -24, -5,  -3,  10,  -10, -12, -23, 10,  -4,  17,  -13, 6,   -4,  10,  -12,
  16,  -23, 24,  -28, 27,  -12, 13,  1,   4,   -1,  3,   10,  -14, -6,  -10,
  10,  -24, 24,  -28, 11,  -4,  26,  2,   7,   8,   -8,  16,  -2,  -3,  -26,
  -2,  -18, 8,   -8,  0,   -14, 17,  16,  6,   21,  -14, 15,  -11, 25,  -28,
  -4,  -11, -4,  -3,  2,   -2,  -10, 14,  4,   5,   -16, 27,  -34, 34,  -24,
  18,  -18, 6,   -18, 24,  -21, 13,  -2,  -6,  4,   -10, 22,  -28, 22,  -12,
  -8,  19,  -12, 19,  -18, 24,  -16, 8,   16,  -26, 14,  -25, 4,   -8,  0,
  -2,  -18, 23,  -6,  18,  8,   -7,  10,  1,   8,   -7,  -12, -2,  -16, 16,
  -13, -6,  7,   -14, 32,  -15, 18,  -20, 15,  4,   -11, 21,  -36, 21,  -13,
  18,  -16, 5,   3,   -11, 21,  -13, 3,   2,   -6,  2,   0,   -7,  3,   13,
  -12, 3,   8,   0,   -2,  18,  -9,  -24, 16,  0,   -19, 8,   -2,  -24, 15,
  32,  -23, 5,   20,  -10, 5,   28,  -19, -37, 26,  -6,  -22, 15,  -10, -26,
  19,  36,  -24, 8,   18,  -14, 12,  22,  -17, -30, 20,  -12, -7,  7,   -6,
  -16, 12,  20,  -9,  8,   2,   -4,  4,   8,   -6,  -8,  12,  -18, 23,  -24,
  24,  -23, 22,  -12, -10, 18,  -22, 22,  -21, 24,  -26, 20,  -7,  6,   -6,
  10,  -11, 2,   8,   -13, 10,  -8,  10,  -19, 25,  -14, 2,   7,   -6,  5,
  -10, 19,  -28, 17,  -4,  -4,  -4,  8,   -4,  -4,  18,  -10, 0,   4,   18,
  -27, 28,  -21, 9,   -8,  9,   -7,  -14, 24,  -27, 24,  -17, 14,  -12, 6,
  -3,  1,   6,   -12, 12,  -6,  -2,  8,   6,   -1,  -12, 23,  -22, 11,  6,
  -15, -18, 16,  2,   -17, 18,  -5,  -17, 28,  24,  -20, -1,  18,  -18, 2,
  24,  -36, -24, 20,  -1,  -17, 18,  -2,  -25, 38,  20,  -16, 0,   18,  -18,
  4,   22,  -32, -8,  4,   8,   -19, 20,  -8,  -10, 20,  2,   0,   -7,  14,
  -15, 10,  2,   -8,  -10, 14,  -14, 13,  -10, 7,   -5,  2,   18,  -26, 25,
  -21, 14,  -8,  6,   -2,  -18, 28,  -24, 17,  -6,  0,   3,   -5,  18,  -27,
  20,  -12, -2,  7,   -10, 10,  -14, 22,  -12, 3,   12,  -16, 20,  -16, 6,
  -10, -2,  10,  -24, 26,  -26, 18,  3,   -4,  13,  -21, 30,  -30, 27,  -16,
  -2,  4,   -9,  15,  -20, 19,  -18, 10,  -1,  4,   -8,  12,  -14, 14,  -12,
  6,   0,   -2,  8,   -16, 22,  -24, 22,  -14, 8,   -6,  -2,  12,  -22, 27,
  -27, 18,  -17, 18,  -10, -1,  14,  -22, 24,  -17, 23,  -28, 20,  -10, -2,
  12,  -18, 14,  -23, 30,  -25, 18,  -6,  -4,  10,  -9,  20,  -28, 27,  -22,
  14,  -6,  -2,  3,   -10, 15,  -16, 15,  -11, 6,   -2,  0,   3,   -6,  6,
  -6,  6,   -6,  5,   -3,  -7,  12,  -14, 15,  -14, 12,  -11, 6,   10,  -17,
  20,  -21, 20,  -18, 16,  -10, -13, 24,  -27, 30,  -28, 24,  -20, 12,  12,
  -22, 25,  -29, 28,  -26, 22,  -13, -8,  18,  -20, 23,  -22, 20,  -18, 10,
  6,   -14, 14,  -18, 16,  -14, 12,  -6,  -2,  6,   -6,  8,   -7,  6,   -6,
  3
};

static const int32_t mdt8x8_mode12[4096] = {
  0,   0,   1,   1,   2,   3,   2,   2,   1,   1,   2,   4,   7,   8,   8,
  8,   2,   2,   5,   8,   10,  12,  16,  18,  2,   6,   10,  12,  12,  18,
  28,  29,  4,   8,   12,  17,  18,  23,  31,  32,  4,   8,   14,  21,  23,
  24,  28,  27,  6,   12,  16,  21,  24,  24,  26,  24,  8,   16,  17,  18,
  21,  22,  24,  22,  2,   2,   2,   2,   2,   4,   2,   -2,  2,   4,   4,
  4,   7,   8,   0,   -8,  4,   2,   -4,  1,   10,  6,   -13, -25, 4,   -4,
  -12, -2,  12,  6,   -31, -51, 4,   -2,  -6,  5,   18,  9,   -31, -56, 6,
  11,  12,  20,  26,  14,  -12, -25, 11,  22,  21,  22,  25,  18,  3,   0,
  14,  22,  18,  16,  18,  15,  6,   2,   -1,  -2,  -1,  -2,  -2,  -2,  -2,
  0,   -2,  -1,  -1,  -7,  -12, -12, -6,  0,   -3,  -5,  -10, -18, -24, -24,
  -14, 0,   -3,  -18, -30, -34, -28, -23, -22, -2,  -3,  -22, -36, -32, -15,
  -14, -10, 10,  -3,  -10, -13, -6,  1,   -4,  16,  31,  0,   2,   6,   10,
  5,   7,   33,  40,  3,   6,   8,   7,   4,   13,  28,  30,  -2,  -2,  -2,
  -2,  -4,  -8,  -13, -12, -2,  -2,  -1,  -8,  -18, -26, -32, -25, -1,  2,
  2,   -16, -32, -32, -22, -13, 2,   9,   1,   -22, -26, 0,   22,  10,  5,
  10,  -6,  -16, 2,   32,  34,  8,   5,   1,   -8,  2,   21,  30,  6,   -17,
  4,   2,   4,   12,  20,  8,   -24, -31, 6,   13,  14,  11,  7,   -8,  -26,
  -26, 2,   1,   -2,  2,   6,   8,   2,   -6,  2,   0,   -2,  6,   10,  3,
  -12, -19, 1,   0,   10,  15,  -2,  -24, -33, -26, 0,   15,  32,  22,  -20,
  -48, -28, 2,   6,   26,  35,  18,  -24, -39, -3,  26,  14,  23,  13,  8,
  -6,  -15, 10,  20,  15,  18,  0,   2,   6,   0,   2,   -1,  12,  12,  2,
  2,   8,   10,  0,   -6,  -4,  -4,  -2,  -8,  -16, -14, -6,  -8,  -5,  -6,
  -4,  -16, -22, -12, -12, -20, 2,   0,   2,   -6,  -2,  6,   -14, -32, 13,
  19,  11,  6,   18,  24,  -4,  -28, 19,  30,  10,  -4,  12,  29,  12,  -14,
  16,  21,  -10, -24, -6,  16,  22,  12,  8,   3,   -21, -31, -22, 0,   25,
  26,  0,   -8,  -18, -22, -20, -2,  22,  20,  0,   0,   -1,  4,   14,  16,
  6,   5,   0,   0,   4,   16,  24,  20,  12,  10,  -4,  -3,  10,  22,  9,
  -4,  7,   10,  -7,  -4,  10,  2,   -22, -18, 4,   -4,  -4,  3,   0,   -30,
  -34, 10,  8,   -24, 4,   4,   -15, -40, -11, 42,  18,  -21, 3,   -6,  -22,
  -20, 19,  44,  16,  -8,  -3,  -14, -20, -4,  24,  20,  -1,  -6,  2,   2,
  4,   5,   0,   -4,  -2,  6,   2,   4,   6,   2,   -9,  -11, 8,   25,  5,
  13,  12,  -7,  -24, -8,  32,  38,  13,  27,  16,  -16, -29, 2,   30,  6,
  20,  30,  8,   -14, -17, -8,  -14, -32, 22,  23,  -2,  -2,  1,   -23, -30,
  -15, 22,  22,  -2,  2,   4,   -14, -7,  14,  19,  19,  4,   -2,  -4,  0,
  16,  20,  2,   5,   4,   -2,  2,   8,   7,   4,   4,   6,   2,   -4,  8,
  17,  10,  2,   7,   0,   -14, -8,  18,  19,  0,   0,   9,   -8,  -34, -18,
  17,  6,   -12, 18,  14,  4,   -28, -20, 14,  -7,  -9,  39,  26,  31,  -9,
  -14, 14,  -2,  -4,  14,  34,  38,  -7,  -20, 6,   8,   -5,  -17, 26,  18,
  -18, -25, -7,  0,   -18, -30, 1,   2,   1,   8,   11,  8,   -5,  -16, 0,
  2,   12,  24,  24,  17,  -5,  -24, 6,   14,  21,  18,  16,  26,  -1,  -26,
  20,  32,  12,  -16, -2,  20,  1,   -6,  26,  18,  -24, -32, -2,  -6,  -4,
  18,  6,   -21, -38, 0,   12,  -23, -14, 16,  -16, -30, -14, 20,  13,  -12,
  -10, 6,   -14, -4,  15,  16,  6,   4,   2,   3,   2,   0,   -2,  6,   14,
  4,   -2,  8,   0,   -2,  -2,  8,   7,   -4,  4,   16,  -2,  0,   4,   -6,
  -20, -14, 4,   6,   -4,  2,   10,  -2,  -18, -14, -10, -7,  2,   -2,  2,
  25,  29,  -2,  -18, 0,   14,  -6,  -17, 35,  60,  16,  -4,  14,  8,   -18,
  -34, 5,   26,  8,   8,   12,  -12, -32, -36, -24, -23, -24, -8,  -2,  0,
  0,   2,   3,   5,   4,   8,   23,  1,   0,   -2,  -4,  4,   16,  18,  16,
  0,   5,   -6,  -23, -6,  29,  12,  -30, 0,   2,   -2,  -29, -26, 18,  12,
  -44, -4,  -1,  16,  -7,  -36, 0,   30,  -3,  -1,  10,  30,  19,  -12, -5,
  28,  28,  0,   6,   12,  18,  10,  -10, -6,  13,  -4,  -12, -15, -4,  2,
  -18, -30, -16, 4,   7,   7,   8,   18,  23,  0,   -13, 1,   5,   10,  23,
  36,  12,  -24, -14, -2,  -3,  2,   26,  24,  -17, -18, 15,  -1,  -10, -12,
  4,   -4,  -10, 12,  10,  2,   -8,  -16, -8,  -6,  18,  19,  -22, 8,   8,
  8,   8,   -1,  12,  16,  -7,  8,   18,  16,  8,   -20, -32, 4,   26,  2,
  6,   4,   -8,  -34, -50, -14, 22,  6,   6,   6,   5,   -10, -13, 9,   19,
  8,   11,  12,  7,   -20, -24, 26,  38,  14,  16,  14,  14,  -2,  -21, 5,
  17,  20,  17,  0,   14,  20,  -14, -29, -11, 24,  10,  -18, -2,  8,   -2,
  1,   -4,  13,  1,   -16, -8,  -8,  6,   40,  10,  -6,  -4,  14,  7,   -12,
  2,   18,  -8,  -16, -2,  32,  20,  -4,  -18, -34, -24, 0,   -3,  -4,  -12,
  -22, -16, 1,   11,  2,   0,   -12, -20, -15, -8,  0,   12,  -1,  -6,  -10,
  6,   24,  9,   -8,  0,   -7,  -12, 2,   20,  16,  -6,  -8,  1,   -6,  -5,
  6,   -6,  -18, -4,  5,   6,   10,  10,  -16, -25, 9,   12,  -18, 6,   12,
  6,   -22, 5,   42,  -14, -40, 26,  0,   -10, 1,   36,  24,  -38, -20, 40,
  -2,  0,   12,  10,  4,   2,   -3,  -7,  4,   14,  16,  -4,  -2,  16,  0,
  -6,  20,  30,  -4,  -34, -1,  15,  -10, 10,  22,  29,  -14, -25, 5,   -16,
  -28, 28,  5,   21,  12,  -2,  1,   -6,  -16, 12,  -18, 10,  38,  -4,  -5,
  34,  -8,  -19, -27, -11, 18,  -6,  2,   20,  -11, 2,   -16, -14, -10, -1,
  -2,  -18, -4,  34,  4,   4,   -4,  -11, -5,  18,  22,  4,   0,   -1,  -16,
  -33, -6,  36,  21,  -9,  -6,  -10, -16, -27, -2,  19,  1,   -13, 4,   -2,
  -8,  8,   -8,  -26, 14,  8,   24,  5,   -15, 22,  -8,  -27, 30,  -10, 26,
  -5,  -29, 15,  8,   3,   16,  -36, -1,  -10, -7,  1,   -6,  2,   5,   -20,
  -16, 10,  28,  2,   -18, -7,  17,  18,  6,   14,  20,  20,  13,  18,  32,
  31,  2,   17,  32,  17,  -2,  11,  27,  18,  -14, 2,   20,  -6,  -28, -12,
  -12, -30, -22, -8,  10,  -2,  -8,  3,   -8,  -13, -13, -5,  4,   7,   22,
  28,  8,   26,  -6,  -4,  -8,  -20, 2,   10,  -18, 3,   -2,  4,   -3,  -24,
  -13, -14, -28, -5,  8,   20,  18,  4,   -4,  0,   15,  26,  16,  14,  14,
  16,  -5,  -15, -2,  4,   20,  28,  20,  8,   -3,  -16, -20, -3,  26,  41,
  8,   -12, 13,  4,   -16, -2,  16,  9,   -6,  7,   6,   0,   21,  -6,  -1,
  -37, -12, 34,  -14, -22, 26,  -14, -8,  -30, -15, 11,  -4,  -7,  8,   -4,
  7,   8,   -18, -27, 9,   12,  -4,  12,  20,  16,  -14, -17, 16,  10,  -7,
  6,   -12, -6,  6,   6,   -16, -18, -11, -26, -18, -2,  37,  13,  -26, 3,
  10,  -36, -14, 2,   40,  12,  -18, 26,  38,  -18, -9,  -14, 2,   12,  -8,
  -8,  20,  -4,  -8,  -18, -16, 8,   -2,  -31, -13, 6,   -1,  12,  6,   -9,
  6,   14,  0,   0,   8,   21,  15,  -8,  1,   20,  10,  -2,  -2,  -11, 4,
  14,  -16, -28, -4,  -1,  8,   -4,  -16, 8,   32,  21,  -12, -24, 2,   -6,
  -16, -8,  10,  22,  0,   -22, -8,  1,   4,   -31, -33, 4,   16,  16,  -10,
  6,   8,   -6,  5,   0,   -8,  6,   -2,  0,   -2,  21,  34,  2,   -11, -19,
  2,   -1,  -13, -14, -20, -8,  22,  14,  8,   6,   -15, -20, -12, -9,  -2,
  22,  7,   6,   5,   25,  43,  -6,  -42, 0,   -3,  -7,  -15, -20, -12, 2,
  12,  -8,  13,  7,   -24, -23, -3,  16,  20,  -9,  22,  26,  6,   0,   6,
  12,  6,   2,   -2,  18,  36,  2,   -14, 2,   -16, 8,   -34, -16, 14,  -17,
  -12, 16,  -20, 0,   -29, -28, -16, -6,  14,  16,  2,   6,   1,   11,  0,
  4,   2,   -4,  16,  4,   26,  37,  13,  -8,  -32, -22, -2,  -17, 15,  4,
  -3,  7,   2,   4,   24,  4,   23,  12,  0,   2,   -14, -5,  6,   -15, 10,
  14,  18,  -2,  -10, 6,   -18, -4,  -7,  -9,  12,  -12, 6,   24,  -14, 26,
  -10, -18, 4,   -10, -2,  10,  -6,  6,   20,  6,   4,   12,  -17, -15, 13,
  -35, 40,  -1,  -15, 34,  -6,  -14, 30,  -20, 8,   -40, -24, 30,  6,   -6,
  14,  6,   11,  28,  11,  -8,  10,  23,  0,   -10, 20,  28,  -2,  -10, 4,
  2,   5,   -16, 38,  8,   -35, 5,   -8,  -26, 22,  -17, 28,  -12, -26, 21,
  -10, -6,  36,  -14, -2,  2,   12,  8,   0,   8,   -14, 4,   -12, 18,  8,
  -21, 4,   4,   -19, 19,  -2,  -9,  -16, 0,   -1,  -4,  14,  0,   -2,  -20,
  10,  32,  -5,  -6,  14,  -19, -18, -18, -4,  -10, -18, 13,  28,  -3,  -16,
  -22, 8,   2,   -22, 18,  35,  -16, 8,   -9,  6,   24,  -10, -24, 8,   -7,
  36,  10,  -17, 12,  6,   -23, 1,   2,   22,  0,   -16, 0,   8,   15,  12,
  -4,  -18, -20, 14,  12,  -6,  -3,  -2,  -3,  -3,  -9,  -2,  11,  4,   -18,
  -9,  7,   38,  5,   -44, -8,  26,  -2,  -4,  6,   6,   22,  13,  -14, -24,
  8,   22,  -20, -1,  30,  26,  -26, -20, 23,  6,   -18, -16, 12,  20,  -8,
  4,   0,   -18, 26,  -18, -6,  4,   7,   2,   -9,  -6,  14,  -5,  3,   -5,
  -7,  -4,  16,  11,  -28, 5,   17,  2,   3,   13,  -8,  -6,  21,  -10, 0,
  7,   4,   11,  -18, -19, 28,  -28, -20, -1,  -14, 0,   36,  0,   -34, 12,
  9,   -38, -30, 18,  8,   -12, 20,  17,  16,  -32, -29, 6,   1,   -10, 7,
  8,   21,  35,  20,  -16, -6,  6,   -18, 8,   -6,  14,  21,  -5,  0,   11,
  -8,  10,  -14, -34, -11, 12,  0,   -3,  14,  4,   12,  8,   0,   -4,  0,
  -11, -7,  -9,  14,  34,  4,   -8,  10,  -12, 0,   -18, -13, -12, -25, 8,
  13,  -13, 26,  28,  38,  12,  -7,  -2,  -18, -49, -22, 22,  27,  14,  -3,
  -12, 7,   6,   3,   2,   -24, -4,  18,  -11, 16,  30,  0,   -10, -18, -4,
  4,   -1,  -14, -23, -6,  -4,  18,  8,   -19, 1,   4,   6,   6,   -3,  -4,
  1,   16,  0,   6,   29,  -8,  -2,  -21, -16, 16,  -4,  -16, -14, -15, 19,
  23,  -11, -18, 2,   8,   -4,  23,  -17, -14, -9,  -22, -4,  0,   -34, -2,
  -15, 2,   18,  -20, 18,  27,  -26, 39,  -2,  16,  28,  -10, 6,   14,  -14,
  19,  12,  2,   -4,  0,   -13, -18, -9,  -23, 0,   -6,  -10, 10,  12,  3,
  20,  2,   -15, 6,   4,   -12, 13,  -2,  8,   6,   4,   2,   -8,  -4,  -10,
  -24, 0,   -28, 27,  -17, -9,  36,  -1,  -4,  34,  -12, -9,  -18, -10, -12,
  -45, -30, 5,   -9,  20,  0,   -12, 26,  18,  4,   18,  -9,  24,  16,  -14,
  13,  22,  -2,  12,  -2,  -18, 5,   -4,  -30, -32, -24, 3,   -9,  -14, 0,
  -1,  8,   20,  12,  4,   6,   18,  4,   0,   15,  7,   8,   -4,  0,   18,
  0,   0,   -18, -40, -7,  -13, 4,   -9,  -20, 13,  6,   15,  23,  -13, 14,
  -10, 30,  28,  -26, -22, 4,   4,   38,  -14, 8,   17,  -20, 2,   14,  -33,
  7,   -14, -16, -2,  1,   5,   11,  -14, -8,  -7,  10,  8,   1,   -12, -2,
  27,  9,   2,   16,  0,   -4,  11,  -7,  -36, 2,   8,   -28, 0,   6,   -10,
  17,  -9,  2,   22,  -24, 11,  8,   -28, 14,  20,  14,  22,  -2,  -2,  6,
  16,  -4,  -30, -4,  -2,  -16, -6,  22,  8,   -20, -30, 3,   -4,  7,   -2,
  0,   4,   10,  4,   3,   -13, 20,  -6,  -15, -4,  6,   14,  -12, -2,  -4,
  -9,  22,  -2,  -16, -12, 10,  28,  -21, 0,   20,  -25, 39,  -14, 10,  44,
  -18, -2,  0,   -31, 33,  -28, 4,   10,  -9,  6,   22,  -4,  -17, 0,   16,
  -6,  14,  -6,  -4,  -2,  5,   14,  -26, -6,  1,   -2,  18,  16,  -26, -4,
  28,  -10, 14,  -6,  -2,  12,  -8,  6,   -6,  -14, 20,  -10, -12, 12,  -7,
  17,  -29, -27, 28,  -8,  4,   26,  -38, 21,  9,   -38, 26,  -15, -18, 23,
  -13, 12,  -8,  -21, 14,  -12, -10, 6,   -4,  6,   -18, -4,  6,   2,   23,
  4,   -22, 14,  12,  -2,  4,   -20, -1,  10,  -2,  14,  -16, 16,  -2,  -10,
  23,  2,   -36, 3,   40,  21,  -16, -10, 15,  -1,  10,  -8,  -8,  24,  -28,
  9,   6,   -18, 38,  -20, -5,  26,  -30, 4,   7,   -22, -4,  -4,  33,  13,
  2,   0,   2,   9,   -3,  4,   -20, -16, 20,  0,   -14, 19,  4,   0,   -6,
  -22, -6,  2,   -5,  -8,  -14, -2,  26,  15,  0,   4,   10,  -6,  11,  -2,
  -23, 38,  8,   -30, 16,  2,   -6,  30,  -9,  19,  6,   -26, 0,   -8,  -12,
  0,   -8,  -22, 0,   14,  4,   11,  5,   -8,  18,  -26, 8,   -7,  -6,  8,
  -4,  12,  -16, 9,   22,  -24, -2,  -4,  -16, -2,  -7,  2,   -1,  19,  16,
  -11, 28,  -12, 34,  -6,  -24, -2,  -6,  -16, 20,  -20, -8,  32,  4,   -10,
  20,  -7,  -20, 26,  -12, 5,   8,   -16, -12, -17, -17, 16,  3,   -14, 26,
  -2,  -1,  15,  -10, 2,   -6,  -32, 16,  3,   6,   11,  -3,  -1,  -1,  -8,
  -13, -11, -4,  -26, 16,  2,   6,   30,  1,   4,   9,   -9,  13,  -24, 10,
  -4,  12,  12,  9,   14,  -10, 9,   -14, -45, 10,  -24, -22, 6,   -22, 36,
  -13, -16, 32,  -14, 8,   32,  -20, -5,  2,   26,  23,  42,  28,  -14, -4,
  6,   -28, 12,  -24, -20, -4,  -1,  0,   -3,  11,  -4,  -22, -22, -13, 6,
  8,   0,   6,   2,   24,  32,  14,  -17, -6,  0,   -14, 10,  -12, -19, -1,
  2,   8,   -4,  14,  -5,  -10, -14, -10, 12,  7,   -2,  -1,  -12, 35,  38,
  -3,  -5,  -18, 8,   -14, -10, -15, -32, 6,   20,  -5,  12,  0,   -24, 27,
  4,   12,  10,  -14, 3,   6,   -44, 17,  -22, 2,   10,  -10, 12,  -12, -22,
  10,  -19, 6,   -5,  6,   -2,  7,   16,  16,  -3,  21,  -20, 19,  -16, 10,
  -1,  -2,  -22, 13,  -20, 6,   -11, -6,  -28, 16,  -15, 16,  -6,  11,  16,
  9,   7,   18,  -18, 13,  -16, 8,   -28, -10, 15,  -20, 0,   16,  -26, 32,
  -13, 19,  20,  4,   -28, -4,  -6,  -20, -10, -33, 0,   20,  11,  8,   12,
  10,  28,  19,  -21, -10, -9,  -16, 2,   -12, -20, -6,  -4,  -6,  2,   3,
  -3,  5,   -2,  -6,  14,  18,  6,   9,   2,   8,   24,  16,  -22, -6,  -15,
  -9,  -6,  -24, -32, -25, -1,  5,   18,  10,  4,   29,  26,  26,  32,  -25,
  4,   0,   -17, -2,  -26, -2,  24,  16,  16,  -26, 16,  1,   -6,  16,  -6,
  -7,  -4,  -16, 20,  -32, 10,  -20, -26, -6,  11,  -2,  24,  -10, 41,  -16,
  12,  6,   12,  -28, 6,   -10, -26, 18,  24,  -20, 10,  -2,  -2,  2,   14,
  -4,  -2,  -19, 21,  -2,  14,  0,   4,   -12, 12,  0,   8,   -32, 7,   -6,
  -10, 17,  18,  -26, 18,  10,  -6,  3,   12,  -14, -4,  33,  -12, -32, -6,
  -10, -20, 10,  7,   2,   -2,  22,  -1,  17,  10,  6,   4,   -26, -2,  22,
  -24, 2,   -14, -5,  6,   29,  -9,  -20, 3,   7,   -12, 17,  -14, 7,   -14,
  19,  -1,  4,   10,  -10, -10, -13, -5,  18,  -28, 2,   -13, 2,   14,  32,
  -8,  -12, 12,  14,  -6,  8,   -40, 8,   -8,  12,  8,   -28, 31,  -22, -55,
  18,  17,  -20, 7,   -16, 10,  -8,  0,   28,  -14, 10,  27,  -20, 18,  -16,
  16,  2,   -5,  -10, -5,  2,   -6,  11,  -8,  -28, 22,  -5,  -8,  10,  -8,
  0,   14,  2,   3,   10,  20,  -16, 14,  -12, 22,  -4,  -9,  -28, -10, -6,
  8,   9,   -9,  -22, 33,  12,  10,  10,  -15, -4,  13,  10,  -24, -3,  6,
  -21, 20,  -4,  -22, 14,  9,   -10, 25,  32,  -1,  -24, -13, -9,  -8,  -2,
  -22, -30, 4,   22,  20,  4,   8,   9,   4,   20,  1,   -10, -8,  -6,  0,
  -4,  2,   4,   -17, 2,   -17, 6,   -10, 5,   -23, -8,  22,  12,  10,  24,
  -14, 26,  14,  20,  -29, -24, -21, -8,  -4,  -10, -36, -6,  14,  31,  11,
  8,   -5,  12,  22,  2,   -6,  -19, -16, 14,  1,   40,  25,  -41, 2,   -8,
  -23, 9,   -7,  -37, 7,   12,  18,  -5,  12,  -16, 20,  -5,  14,  -10, -12,
  8,   30,  -20, 14,  0,   4,   -10, 5,   -8,  -13, 2,   2,   -28, 0,   12,
  9,   0,   -2,  -8,  14,  26,  6,   -10, -19, 11,  28,  -8,  -8,  -20, -14,
  10,  12,  -11, -20, 3,   17,  -8,  25,  -18, 1,   4,   12,  28,  -30, -20,
  4,   -9,  32,  -34, -20, -4,  0,   23,  12,  -23, 3,   20,  -9,  -12, 15,
  -16, -4,  18,  -13, -2,  36,  4,   -6,  -10, 10,  -14, 21,  -8,  -8,  -16,
  18,  5,   6,   -17, -14, 8,   -4,  -2,  6,   -26, 2,   32,  8,   -6,  24,
  -6,  -5,  22,  0,   -32, -4,  3,   -16, 9,   8,   -20, 6,   15,  -1,  0,
  11,  20,  -2,  13,  12,  2,   6,   4,   -26, -10, -20, -4,  -21, -2,  -7,
  -12, -2,  33,  -12, 40,  -12, 32,  -6,  24,  -14, 12,  -36, 13,  -30, -4,
  -16, -18, -4,  8,   18,  -1,  21,  3,   22,  12,  10,  -30, 18,  -28, 10,
  -22, -3,  -16, 22,  -10, 12,  -7,  11,  4,   8,   10,  -10, 4,   0,   1,
  -5,  -2,  -2,  -4,  2,   16,  35,  3,   -24, 0,   10,  4,   2,   -22, -28,
  -2,  10,  6,   -18, -6,  -6,  13,  30,  -4,  6,   -5,  17,  13,  10,  -22,
  9,   -22, 6,   -20, -6,  -22, 10,  -8,  4,   4,   24,  6,   16,  16,  -16,
  20,  -2,  0,   -36, -3,  -20, -11, -10, 8,   -38, 34,  2,   24,  4,   14,
  -13, 24,  -6,  8,   -22, 4,   -10, -4,  -24, 7,   30,  11,  -10, -6,  -5,
  -20, 23,  -15, -36, -5,  8,   8,   8,   19,  -2,  8,   25,  8,   -8,  -4,
  -12, -13, -17, 3,   -16, 4,   -4,  10,  10,  5,   2,   17,  -29, 20,  -8,
  4,   -20, 8,   -16, 10,  16,  0,   -14, 2,   15,  -16, 13,  -22, -3,  -18,
  40,  -23, 4,   9,   18,  -19, 37,  -27, 5,   -4,  4,   -6,  -28, -14, -10,
  20,  0,   8,   8,   -15, 4,   32,  -4,  -6,  -8,  2,   -11, 20,  4,   -4,
  -16, 12,  -10, 5,   -3,  -4,  -6,  -17, 16,  -4,  10,  -7,  17,  -9,  32,
  6,   12,  -33, 18,  -16, -14, 16,  -8,  -34, 10,  20,  -8,  11,  24,  -28,
  -1,  32,  -12, -17, 4,   -5,  -24, 30,  -8,  -7,  -4,  22,  -16, 12,  9,
  -18, -2,  16,  18,  -6,  -7,  -8,  -30, -10, -3,  -11, -24, 16,  -2,  21,
  30,  16,  -18, 16,  -8,  4,   -17, -10, -32, -15, -3,  20,  10,  2,   22,
  -1,  22,  14,  2,   -44, 5,   -28, 6,   -14, 4,   -15, 29,  8,   36,  -6,
  22,  -10, -2,  6,   -16, -14, -14, -8,  -10, 9,   3,   0,   6,   14,  -7,
  22,  -15, 8,   -12, 4,   -7,  40,  -28, 6,   9,   -2,  -17, 26,  -28, -8,
  -4,  18,  -36, 26,  1,   -22, 22,  0,   -5,  0,   18,  -12, -6,  24,  -15,
  0,   18,  -32, 18,  -12, 16,  -23, 10,  -16, 10,  9,   -4,  6,   -15, 17,
  10,  10,  -16, 3,   -9,  6,   6,   -8,  -26, 6,   8,   -6,  18,  -16, 5,
  -4,  25,  -22, 16,  -14, 2,   0,   4,   0,   16,  0,   -14, 0,   -13, -16,
  19,  -2,  -21, -2,  25,  -10, 25,  12,  -17, -2,  19,  -16, -20, -9,  -10,
  -18, 16,  10,  5,   23,  20,  23,  -12, 24,  -16, -15, -28, -16, -32, -6,
  8,   -8,  2,   24,  28,  21,  23,  6,   -13, -4,  12,  -30, -10, -26, -9,
  -8,  14,  4,   -12, 26,  7,   10,  4,   2,   -5,  -4,  9,   -14, 30,  4,
  0,   16,  -35, 22,  -9,  -8,  -36, 0,   -20, 7,   9,   0,   -2,  17,  -4,
  22,  12,  0,   -2,  0,   2,   -20, 28,  -26, -11, -4,  2,   -8,  8,   16,
  -28, 10,  22,  -5,  2,   16,  -20, -5,  14,  7,   -34, 17,  -7,  -20, 26,
  -4,  -6,  -10, 29,  -14, 2,   21,  -26, 8,   8,   -2,  -8,  3,   6,   -16,
  19,  -7,  -8,  16,  -2,  -18, 25,  -24, 36,  -20, -2,  -16, 12,  -5,  8,
  -12, -22, 20,  23,  -6,  3,   -2,  -8,  26,  9,   -18, -18, 8,   -9,  5,
  6,   -39, 6,   14,  -3,  -1,  -1,  -5,  0,   41,  -8,  -12, 20,  -6,  1,
  16,  -18, -26, 0,   15,  -24, 10,  -2,  -15, 24,  11,  7,   -16, 12,  -7,
  -2,  14,  -24, 8,   -13, 14,  2,   -8,  -12, 22,  -17, 29,  -3,  -8,  -22,
  32,  -4,  6,   -20, -12, -14, 21,  0,   -6,  -28, 15,  11,  22,  8,   -22,
  -2,  8,   32,  -13, -18, -16, -9,  23,  14,  -24, -18, 0,   28,  4,   16,
  -22, -13, 20,  18,  -8,  -18, -6,  -13, 18,  6,   -11, -14, 10,  10,  6,
  10,  -12, 4,   -6,  22,  -26, 14,  -16, 4,   1,   23,  -10, 8,   -8,  28,
  2,   -24, -6,  -12, -21, 22,  -25, -17, -18, 42,  4,   20,  -2,  6,   1,
  48,  -4,  -30, -8,  -10, -5,  6,   -8,  -40, 4,   22,  8,   2,   7,   -16,
  16,  25,  2,   -22, -1,  0,   0,   7,   -8,  -20, -2,  18,  -4,  0,   2,
  -10, 12,  5,   6,   -16, 9,   -12, 15,  -14, 10,  -12, 6,   2,   -4,  -33,
  26,  -33, 38,  -20, 23,  -7,  2,   18,  16,  -10, -2,  -11, -2,  -8,  4,
  2,   -36, 28,  -14, 29,  -12, 17,  -10, 4,   18,  -10, -10, -5,  -2,  -5,
  4,   -9,  0,   -7,  22,  -12, 14,  -3,  2,   8,   -6,  14,  -24, 20,  -20,
  8,   -6,  8,   -15, 11,  -4,  2,   4,   0,   4,   -11, 20,  -24, 24,  -22,
  16,  -14, 6,   0,   -14, 10,  18,  16,  -27, 17,  -17, 6,   14,  2,   -46,
  0,   21,  -10, 15,  -10, -13, 4,   52,  -4,  -18, 6,   -10, 4,   24,  -22,
  -40, -2,  16,  0,   7,   -4,  -25, 30,  22,  6,   -16, 0,   -4,  13,  13,
  -26, -12, -4,  11,  2,   2,   -20, 2,   8,   14,  -6,  2,   -5,  2,   10,
  -4,  -4,  -4,  1,   2,   0,   -1,  22,  13,  -6,  16,  -26, 2,   -2,  -4,
  -45, -10, -3,  -14, 26,  6,   0,   10,  50,  8,   12,  2,   -14, -20, 9,
  -17, -33, -18, -1,  -9,  13,  23,  -11, 18,  13,  23,  -5,  6,   -5,  -26,
  14,  -18, 2,   -27, 12,  -10, 2,   23,  -14, 14,  -2,  17,  -4,  4,   4,
  -20, 12,  -12, -4,  -2,  -7,  5,   -8,  13,  -10, 8,   -9,  29,  -16, -2,
  13,  -20, 17,  -13, 8,   -39, 17,  6,   -16, 27,  -23, 21,  2,   33,  -17,
  -4,  10,  -22, 18,  -20, -21, -13, 8,   4,   -1,  10,  -8,  15,  32,  -6,
  2,   -1,  -10, 3,   -6,  -5,  -32, 12,  -3,  -6,  20,  -14, 16,  -2,  27,
  -14, 3,   10,  -24, 20,  -21, 8,   -12, 10,  -4,  -4,  12,  -14, 14,  -6,
  12,  -17, 12,  -16, 22,  -16, 10,  -5,  -7,  13,  -11, 16,  -28, 23,  -16,
  8,   -18, 16,  -22, 14,  4,   -10, 8,   -4,  26,  -28, 32,  -25, 8,   2,
  0,   0,   -18, 22,  -26, 18,  -6,  -4,  4,   -2,  -2,  1,   1,   2,   -6,
  9,   -7,  4,   18,  -23, 23,  -26, 24,  -22, 16,  -6,  -11, 17,  -20, 24,
  -21, 18,  -16, 7,   20,  -25, 15,  -6,  -2,  0,   -2,  4,   -24, 20,  -6,
  -8,  20,  -10, 8,   -9,  29,  -20, 2,   12,  -26, 16,  -12, 12,  -30, 16,
  4,   -16, 29,  -20, 13,  -14, 30,  -18, -2,  12,  -27, 21,  -12, 12,  -32,
  26,  -8,  -2,  15,  -14, 7,   -9,  28,  -26, 14,  -4,  -6,  7,   -4,  6,
  -14, 16,  -13, 10,  -4,  0,   0,   -1,  12,  -20, 22,  -16, 15,  -12, 10,
  -4,  -18, 26,  -24, 20,  -18, 16,  -13, 6,   8,   -12, 8,   -5,  2,   -4,
  6,   -3,  4,   -6,  6,   -8,  9,   -4,  2,   0,   -13, 20,  -20, 22,  -22,
  14,  -10, 4,   19,  -28, 29,  -31, 29,  -20, 14,  -7,  -16, 24,  -26, 28,
  -26, 20,  -14, 8,   7,   -12, 14,  -15, 14,  -10, 8,   -4,  10,  -16, 19,
  -20, 16,  -10, 6,   -2,  -20, 26,  -32, 33,  -28, 20,  -13, 6,   19,  -23,
  31,  -30, 25,  -18, 11,  -6,  -16, 19,  -29, 29,  -23, 16,  -9,  4,   14,
  -16, 24,  -24, 18,  -12, 7,   -4,  -9,  8,   -13, 15,  -10, 8,   -3,  2,
  8,   -6,  8,   -10, 7,   -6,  2,   -2,  -4,  2,   -2,  4,   -2,  2,   0,
  0
};

static const int32_t mdt4x8_mode0[1024] = {
  1,   2,   4,   8,   2,   4,   10,  18,  3,   8,   17,  28,  4,   14,  27,
  36,  8,   22,  33,  36,  12,  28,  35,  34,  16,  30,  34,  32,  20,  30,
  29,  26,  -1,  0,   6,   14,  1,   10,  23,  31,  6,   25,  41,  36,  16,
  36,  39,  22,  20,  28,  14,  -2,  12,  4,   -15, -21, 0,   -18, -31, -30,
  -14, -30, -34, -28, 0,   9,   19,  16,  10,  30,  37,  20,  26,  42,  26,
  -2,  25,  19,  -12, -20, 6,   -22, -35, -12, -18, -40, -21, 8,   -23, -18,
  13,  29,  -4,  16,  31,  32,  14,  32,  28,  12,  34,  50,  29,  -4,  29,
  19,  -10, -18, -4,  -29, -20, 7,   -26, -28, 12,  28,  -9,  15,  30,  14,
  12,  19,  -2,  -18, 0,   -18, -31, -30, 7,   3,   -12, -19, 6,   -4,  -22,
  -16, -6,  -4,  5,   24,  -14, -10, 27,  50,  -24, -30, 10,  46,  -38, -46,
  -8,  22,  -40, -31, -6,  2,   -20, -4,  2,   -2,  8,   20,  16,  -3,  23,
  30,  0,   -30, 14,  -8,  -26, -17, -12, -12, 8,   14,  10,  36,  26,  -4,
  32,  20,  -18, -12, -6,  -40, -22, 26,  -37, -26, 26,  46,  -8,  -15, -16,
  -22, -14, -14, -10, -32, 8,   28,  0,   -38, 42,  36,  -19, -12, 38,  7,
  -4,  34,  13,  2,   32,  38,  -15, -6,  12,  6,   -32, -28, -18, -10, 34,
  44,  10,  -30, 42,  21,  -24, -34, -2,  -16, -2,  2,   2,   28,  25,  -10,
  34,  27,  -12, -18, 1,   -22, -10, 7,   -13, 10,  20,  -6,  28,  32,  -8,
  -32, 24,  30,  17,  26,  4,   -16, 10,  44,  -44, -40, 8,   10,  -32, -2,
  -10, -24, 8,   10,  -21, 1,   10,  -4,  14,  40,  -14, -10, 22,  19,  -36,
  -30, -12, -6,  -33, -19, 36,  42,  -24, 6,   26,  4,   -2,  -22, -44, -14,
  7,   -10, -12, 20,  28,  24,  20,  15,  4,   -21, -8,  0,   -35, -20, 12,
  -10, 9,   36,  5,   -40, -32, -9,  10,  -8,  4,   7,   -20, 6,   44,  -18,
  -30, 44,  26,  -7,  10,  5,   -4,  4,   -1,  -49, -34, 10,  18,  -3,  -23,
  18,  36,  26,  -22, -31, -18, -3,  38,  18,  -21, 7,   17,  -22, -4,  36,
  10,  -10, -8,  -12, 31,  7,   -14, -26, 0,   14,  42,  6,   -42, 15,  33,
  -25, -46, -8,  -20, -27, 5,   12,  16,  20,  -6,  -38, -44, 11,  30,  7,
  -12, 18,  36,  16,  14,  -18, -32, -12, 18,  -36, -30, 28,  20,  -8,  10,
  5,   -13, 32,  -7,  -25, 8,   20,  -5,  18,  1,   -40, -14, -27, -22, -14,
  10,  34,  24,  -16, -24, 7,   31,  0,   -44, -17, 0,   2,   22,  2,   -10,
  -5,  5,   10,  30,  -36, -50, 24,  30,  -30, -25, 6,   8,   12,  23,  -20,
  -18, 62,  34,  -17, -16, 4,   7,   4,   -18, -41, -10, 18,  18,  30,  16,
  -6,  -6,  10,  -6,  -25, -18, -30, 6,   37,  24,  12,  2,   -25, -19, 18,
  32,  4,   -30, -16, 18,  -14, -9,  29,  20,  9,   -10, 30,  22,  -32, -49,
  36,  24,  -14, -17, 8,   44,  8,   -20, -18, 4,   -4,  18,  1,   -24, 17,
  14,  -28, -44, -10, -4,  -8,  35,  8,   -21, 26,  30,  -24, -4,  20,  -19,
  -4,  -22, -10, 31,  6,   -24, 32,  18,  -18, 6,   19,  -6,  -2,  -31, -22,
  41,  -10, -22, 41,  27,  -4,  -18, -17, -23, 4,   25,  -2,  -14, 17,  10,
  -4,  -4,  -34, -24, 20,  13,  26,  10,  -14, -16, 1,   -10, 2,   -24, -12,
  2,   48,  59,  -22, -50, 10,  23,  12,  22,  37,  -24, -30, -26, -22, 27,
  34,  -2,  10,  -13, -8,  18,  8,   -17, -10, -28, -21, 42,  26,  16,  18,
  -48, -12, 2,   -26, 18,  12,  -13, 18,  26,  -26, -40, -8,  0,   26,  44,
  13,  -8,  -24, -47, -9,  19,  7,   42,  18,  8,   -22, -34, -22, 4,   18,
  6,   40,  -3,  -2,  -27, -14, 5,   2,   6,   5,   -16, 19,  -19, -10, -7,
  12,  16,  6,   7,   -44, 8,   -15, 23,  36,  3,   1,   -60, -4,  -16, 30,
  38,  12,  -8,  -36, -22, -18, 36,  12,  16,  2,   -24, 4,   32,  5,   -10,
  -22, -46, -6,  32,  0,   47,  -6,  -18, 10,  -20, -4,  3,   -16, -12, 34,
  14,  6,   10,  -56, -6,  6,   18,  23,  22,  -35, -18, -5,  -6,  22,  -4,
  12,  -20, 32,  -20, 36,  -27, -12, -16, -12, 22,  4,   45,  -37, 1,   -14,
  -4,  22,  -5,  19,  -11, 18,  -56, 28,  -13, 34,  5,   -26, -9,  -6,  2,
  12,  22,  -30, -8,  41,  19,  -2,  16,  -54, 10,  -34, 29,  30,  14,  9,
  -37, 15,  -18, 32,  -27, -5,  -19, -6,  30,  3,   26,  -25, -6,  -6,  -2,
  4,   6,   -1,  -23, 13,  19,  -28, 27,  -59, 36,  3,   22,  -11, 26,  -40,
  -2,  -14, 3,   34,  -6,  25,  -24, -7,  -25, 26,  -28, 20,  -7,  12,  8,
  -22, -1,  -7,  15,  -2,  14,  -1,  10,  3,   -22, -10, 8,   -10, 42,  -40,
  33,  -10, 2,   -30, 32,  -20, 33,  -19, -14, 24,  -1,  7,   9,   -22, -4,
  19,  -38, 44,  -22, 29,  -18, -10, -35, 53,  -46, 23,  -11, 3,   -2,  -2,
  9,   -16, 30,  -26, 9,   -14, -1,  28,  12,  -15, 24,  -46, 22,  -38, 32,
  12,  6,   -2,  -9,  -2,  6,   -8,  14,  -6,  -6,  -11, 6,   -2,  29,  -16,
  20,  -14, -18, -3,  0,   12,  8,   22,  -28, 4,   -24, -8,  37,  -24, 28,
  -14, -19, 22,  -28, 48,  -36, 14,  -28, 34,  -37, 16,  -3,  25,  -22, 8,
  -30, 14,  -4,  -2,  20,  5,   -14, 8,   -44, 48,  -32, 14,  -6,  16,  -20,
  10,  -16, 18,  -10, 0,   -25, 38,  -38, 22,  4,   -16, 35,  -31, -6,  12,
  0,   -8,  -14, 24,  -32, 33,  -8,  17,  -6,  -29, -4,  2,   -6,  34,  -14,
  40,  -36, -8,  -22, -2,  22,  -4,  19,  -8,  -12, 2,   -36, 52,  -40, 19,
  -22, 37,  -38, 20,  -1,  -15, 26,  -23, 8,   6,   -18, 22,  -27, 17,  -4,
  -12, 31,  -24, 12,  6,   -32, 36,  -25, 5,   19,  -29, 24,  -7,  -15, 30,
  -36, 18,  28,  -30, 24,  -10, -23, 29,  -26, 14,  24,  -38, 34,  -23, -18,
  32,  -28, 23,  17,  -35, 32,  -24, -7,  20,  -21, 20,  2,   -14, 17,  -19,
  2,   1,   -4,  10
};

static const int32_t mdt4x8_mode1[1024] = {
  14,  4,   0,   0,   33,  13,  0,   0,   45,  22,  2,   0,   48,  27,  4,
  0,   46,  26,  4,   0,   44,  24,  4,   0,   42,  21,  2,   0,   38,  17,
  2,   0,   18,  18,  3,   0,   18,  41,  10,  0,   -4,  52,  20,  0,   -26,
  48,  26,  4,   -30, 40,  21,  5,   -28, 30,  14,  2,   -28, 16,  8,   0,
  -30, 4,   5,   0,   6,   1,   0,   2,   0,   1,   2,   1,   -32, -6,  5,
  2,   -52, -14, 7,   2,   -40, -6,  8,   1,   -4,  14,  6,   2,   46,  32,
  5,   1,   75,  38,  6,   2,   34,  0,   -4,  1,   69,  7,   -6,  1,   58,
  6,   -4,  2,   4,   -18, 0,   6,   -35, -38, -2,  8,   -39, -34, -4,  4,
  -11, -20, -5,  1,   24,  -5,  -3,  0,   24,  11,  1,   0,   20,  22,  6,
  0,   -28, 17,  16,  2,   -40, 2,   17,  6,   5,   -8,  -1,  8,   54,  -22,
  -20, 4,   45,  -42, -22, 1,   -13, -54, -14, 0,   -20, -22, -8,  -4,  2,
  -32, -21, -6,  22,  -2,  -29, -10, -12, 35,  -20, -22, -36, 46,  -8,  -25,
  -16, 25,  -14, -14, 16,  -15, -30, -9,  20,  -42, -34, -10, 44,  -6,  -9,
  0,   52,  -18, -18, 0,   -8,  -38, -24, -4,  -27, -29, -22, -10, 2,   10,
  -10, -12, 24,  40,  5,   -8,  1,   35,  10,  -2,  -52, 8,   8,   -2,  -19,
  -30, 2,   4,   2,   -46, 4,   8,   29,  -28, 22,  12,  0,   -6,  46,  23,
  -20, 8,   51,  28,  9,   13,  34,  21,  19,  0,   20,  14,  -14, -30, 10,
  12,  -46, -6,  0,   0,   -16, 8,   -2,  1,   49,  34,  -10, 0,   -17, 4,
  -13, -4,  -42, -28, -16, -5,  32,  -12, -18, 0,   36,  19,  -2,  2,   -48,
  32,  22,  2,   21,  44,  10,  -6,  -32, 32,  24,  -6,  10,  -16, 8,   -3,
  44,  -32, -6,  -10, -34, -12, 8,   -22, -20, 26,  20,  -20, 42,  13,  5,
  -10, -14, -38, -11, -9,  12,  5,   -3,  12,  -8,  5,   -10, 14,  -10, 15,
  -33, 8,   2,   18,  -48, -2,  -6,  5,   -17, 4,   -4,  -2,  24,  22,  11,
  -16, 45,  36,  14,  -36, 52,  46,  -26, 16,  22,  -7,  12,  4,   32,  -8,
  28,  -10, 12,  -16, -38, -10, 0,   -40, 12,  6,   14,  -50, 30,  -9,  30,
  -26, -31, -27, 36,  -10, 21,  -5,  20,  -9,  -46, 8,   0,   6,   6,   34,
  -2,  7,   20,  12,  -2,  15,  -22, -48, -12, 28,  14,  -5,  -21, 27,  10,
  52,  -10, 12,  -34, 20,  -4,  7,   22,  -38, -22, 8,   -42, -36, 2,   -4,
  42,  2,   -4,  -8,  -36, 33,  2,   -16, 6,   4,   0,   -18, 32,  -38, 7,
  -12, -38, -6,  22,  -12, 30,  33,  14,  -16, -9,  -32, 2,   -11, -52, 44,
  14,  4,   38,  25,  2,   7,   -4,  -52, -2,  12,  -6,  4,   -4,  4,   16,
  40,  0,   5,   -36, -20, -10, 12,  35,  -13, -12, 18,  -18, 20,  6,   12,
  6,   -36, 28,  12,  14,  -22, 57,  14,  -6,  0,   54,  10,  12,  -4,  -8,
  12,  -10, 16,  -54, -7,  -14, 18,  -38, -16, 6,   -6,  4,   -6,  -1,  -4,
  30,  8,   -18, -31, -28, -14, 12,  28,  -28, -22, -22, 15,  2,   -18, 30,
  -44, 3,   8,   -23, 25,  6,   5,   6,   28,  6,   -8,  7,   -65, 10,  -8,
  -2,  27,  24,  -12, -29, 16,  11,  0,   39,  2,   2,   9,   -42, -22, -2,
  8,   48,  35,  -3,  0,   -54, -28, 9,   -6,  49,  6,   -8,  0,   -34, 10,
  -3,  2,   12,  -6,  -3,  6,   -2,  -10, 5,   31,  6,   -2,  10,  48,  -7,
  14,  -10, 48,  -2,  1,   -32, 33,  -4,  8,   -4,  -4,  6,   -12, 50,  -18,
  10,  -20, 19,  -21, -8,  20,  -46, -30, 4,   -20, 24,  21,  3,   0,   13,
  28,  -8,  27,  -6,  10,  9,   -30, 5,   -39, 4,   -6,  34,  -41, -4,  18,
  -2,  22,  -2,  -14, -41, 48,  -6,  21,  -23, 42,  -2,  30,  -10, 26,  -4,
  -15, -32, 44,  0,   8,   -17, 34,  -4,  2,   33,  4,   16,  -22, 19,  -21,
  -14, 28,  -32, -34, 0,   -14, -10, -23, 6,   -8,  54,  -16, 2,   -41, -40,
  24,  -10, 50,  -24, 18,  4,   -24, 17,  18,  6,   -8,  24,  -6,  -8,  28,
  -4,  -33, 8,   -43, -14, -24, -8,  35,  18,  8,   4,   -17, -6,  20,  -1,
  -5,  -24, -34, 1,   0,   17,  -32, 2,   -3,  4,   25,  -10, 13,  -28, 49,
  10,  -14, 26,  -17, -2,  3,   18,  -56, -2,  0,   -38, 1,   -2,  4,   10,
  54,  8,   -28, 46,  -6,  -2,  18,  24,  -6,  -4,  6,   -46, 10,  4,   -22,
  -20, 18,  -6,  33,  46,  8,   8,   -30, -19, 8,   -8,  24,  -24, -15, 6,
  -16, 38,  -34, 10,  -47, 15,  19,  -14, 55,  6,   -3,  14,  -52, -6,  -1,
  -14, 46,  -5,  -6,  11,  -42, 0,   8,   -6,  37,  12,  8,   3,   -22, -15,
  6,   -2,  6,   10,  -22, 5,   -12, 65,  -32, -4,  12,  -23, 18,  0,   -4,
  -37, -6,  1,   0,   46,  5,   -3,  2,   -32, 8,   1,   0,   13,  -20, 3,
  -6,  10,  -40, -2,  6,   -12, 54,  -3,  0,   -38, 4,   0,   6,   22,  47,
  3,   -6,  12,  -22, 0,   -4,  -21, -41, -2,  7,   10,  39,  4,   -5,  21,
  13,  -4,  2,   -38, -65, 1,   -1,  17,  32,  0,   -5,  -18, -74, 0,   3,
  0,   14,  0,   -1,  6,   54,  1,   0,   16,  -10, 0,   0,   -33, -32, 0,
  0,   27,  50,  -2,  4,   -22, 0,   2,   -6,  19,  -26, -2,  10,  19,  49,
  0,   -7,  -29, -16, 0,   4,   16,  -28, 4,   -7,  14,  23,  -6,  10,  -38,
  -16, 9,   -14, 60,  0,   -8,  12,  -60, 10,  4,   -7,  30,  -10, 6,   -2,
  48,  -18, -6,  0,   -68, 2,   4,   1,   66,  26,  -3,  -1,  -47, -26, 0,
  2,   22,  18,  2,   -4,  -4,  -12, -2,  2,   -2,  -2,  1,   -2,  2,   -1,
  -1,  2,   3,   45,  1,   -3,  -2,  -68, 0,   2,   0,   48,  0,   0,   0,
  -8,  0,   -2,  2,   -22, -2,  4,   -8,  47,  2,   -5,  10,  -61, -2,  2,
  -4,  28,  2,   0,   6,   -12, -3,  4,   -16, 32,  4,   -6,  20,  -54, -5,
  6,   -22, 60,  5,   -6,  20,  -58, -4,  4,   -17, 48,  2,   -2,  11,  -28,
  0,   0,   -5,  8
};

static const int32_t mdt4x8_mode2[1024] = {
  0,   2,   2,   4,   2,   4,   12,  10,  6,   18,  31,  28,  13,  36,  48,
  50,  16,  36,  40,  46,  14,  20,  20,  26,  12,  11,  11,  12,  8,   7,
  8,   6,   -4,  -1,  5,   4,   2,   11,  16,  14,  10,  24,  31,  24,  16,
  32,  26,  10,  12,  8,   -16, -23, -3,  -24, -43, -40, -10, -30, -38, -34,
  -14, -28, -32, -30, 2,   -1,  -6,  -12, -6,  -18, -22, -25, -30, -40, -26,
  -14, -26, -18, 2,   19,  10,  33,  24,  16,  24,  34,  6,   -9,  16,  -2,
  -26, -32, -8,  -34, -38, -36, 10,  17,  20,  18,  24,  47,  48,  26,  18,
  28,  18,  6,   -16, -39, -36, -9,  -8,  -12, 1,   12,  16,  30,  26,  14,
  14,  12,  -2,  -6,  -11, -26, -28, -19, 7,   6,   -6,  -8,  10,  12,  -16,
  -36, 16,  22,  -2,  -29, -12, -16, 18,  45,  -41, -51, 4,   54,  -31, -30,
  -11, 10,  -12, -12, -13, -6,  -4,  -10, -12, -4,  5,   2,   -2,  -2,  0,
  0,   -9,  -14, 22,  25,  -10, -58, 33,  51,  14,  -64, -2,  10,  21,  2,
  -9,  2,   21,  30,  3,   4,   -5,  4,   -6,  -18, -26, -21, 2,   6,   12,
  9,   30,  50,  28,  -8,  8,   -8,  -42, -28, -8,  -10, 2,   2,   17,  42,
  50,  -3,  -7,  -13, -16, -26, -26, -29, -18, 6,   0,   11,  22,  32,  -20,
  -30, -26, -10, -22, -26, -14, -10, 42,  52,  26,  -25, -6,  -20, -20, -4,
  -2,  11,  6,   11,  36,  39,  -3,  -35, -2,  -19, -18, -7,  -4,  6,   22,
  24,  21,  20,  -11, -32, 42,  32,  -30, -61, 10,  14,  18,  26,  -6,  -2,
  24,  2,   -10, 3,   -5,  -58, 0,   26,  18,  -8,  8,   14,  0,   8,   13,
  -2,  -2,  12,  -12, -4,  18,  12,  -6,  15,  22,  -12, 10,  -6,  -46, -25,
  50,  28,  0,   42,  -2,  -30, -27, -5,  15,  32,  10,  -46, 22,  32,  10,
  -12, 6,   8,   4,   -1,  -20, -20, 4,   -7,  -12, -9,  -17, -16, 33,  20,
  -22, 24,  31,  -24, -41, 37,  32,  23,  14,  -19, -34, -21, 21,  7,   -22,
  2,   26,  23,  -20, -16, -24, -24, 8,   6,   2,   14,  -14, -23, -12, 38,
  10,  -7,  -20, 34,  10,  2,   12,  -5,  -56, -18, 53,  -22, -32, 20,  34,
  -21, -4,  -4,  -24, -14, -13, -17, 0,   26,  0,   -1,  29,  56,  -7,  -17,
  -16, 7,   15,  20,  -14, -23, -44, -8,  39,  18,  -22, 8,   2,   -40, 22,
  2,   -30, 4,   12,  1,   33,  37,  -14, -8,  -10, -13, 3,   3,   -4,  -4,
  4,   2,   3,   -10, -18, -14, 4,   0,   12,  16,  -6,  6,   14,  -14, -19,
  6,   18,  8,   -4,  12,  2,   -19, -2,  36,  -70, -64, 8,   55,  -22, -30,
  -51, -54, 14,  20,  14,  38,  14,  -11, -10, -3,  -14, -5,  26,  -12, -14,
  0,   12,  5,   -6,  -4,  -26, -26, 10,  40,  37,  16,  -16, -15, -10, -10,
  55,  56,  6,   -17, -9,  -27, -6,  18,  -11, 26,  14,  -30, -15, 6,   -16,
  12,  24,  14,  6,   6,   -16, -17, 3,   -44, -6,  41,  22,  -12, -6,  -10,
  -2,  18,  12,  46,  30,  -46, 2,   -10, -20, 22,  40,  -6,  -28, 18,  28,
  -6,  -16, -1,  -15, 9,   -3,  15,  22,  9,   -52, 18,  27,  -12, -18, 28,
  16,  1,   2,   -6,  20,  10,  0,   10,  11,  6,   -19, -10, -20, 0,   -2,
  26,  18,  8,   -4,  -24, -11, -22, 18,  30,  39,  20,  -6,  -36, -63, -20,
  42,  20,  -12, 16,  -10, -32, 11,  -2,  -24, -15, 38,  -9,  -13, 58,  -10,
  0,   -3,  -37, 0,   5,   4,   36,  12,  -7,  -26, -18, -4,  21,  36,  5,
  -24, -42, -17, 32,  22,  7,   -14, -12, -36, -20, 26,  20,  32,  0,   -34,
  4,   -10, 6,   0,   14,  -14, 18,  -18, -14, 4,   0,   -2,  28,  1,   -13,
  -1,  -27, 4,   20,  -8,  22,  55,  -28, -42, 42,  32,  -18, -40, 14,  -15,
  -2,  30,  -13, -49, 21,  8,   -8,  34,  -4,  -30, 16,  -26, 3,   31,  -20,
  0,   3,   -38, 10,  16,  2,   -6,  30,  36,  -10, -16, 2,   6,   8,   -2,
  -25, -60, 5,   36,  -8,  8,   10,  -32, 12,  -16, -8,  32,  -4,  -2,  4,
  -26, -4,  21,  1,   13,  16,  -52, 0,   1,   0,   35,  -17, -34, 31,  8,
  13,  -20, 42,  -2,  8,   -22, 8,   22,  -36, 26,  -16, 53,  -58, 36,  -11,
  20,  8,   -13, 10,  -19, 20,  -20, 1,   -12, 13,  7,   -8,  12,  -12, -14,
  18,  15,  -12, -11, 6,   -3,  10,  -24, 15,  -18, 42,  -40, 18,  -2,  -18,
  23,  -12, 68,  -54, 24,  -4,  13,  0,   -10, 13,  12,  18,  -28, -3,  -2,
  4,   10,  -2,  2,   -3,  -26, 14,  34,  2,   -24, 19,  7,   10,  -20, 2,
  6,   20,  -26, 20,  -19, 14,  -4,  -14, 35,  -7,  -21, 46,  -33, 22,  18,
  -66, -4,  -8,  4,   22,  -56, 14,  46,  -31, -13, 18,  -16, 14,  -57, 26,
  20,  -24, 20,  -20, 10,  4,   -14, 4,   10,  -16, -11, 23,  -14, 14,  -29,
  20,  -6,  -4,  -10, 2,   10,  -2,  -22, 15,  10,  -16, 1,   -16, 16,  -3,
  22,  -38, 38,  -22, 6,   -2,  -4,  12,  18,  -48, 54,  -32, 48,  -32, 8,
  5,   -4,  1,   4,   -2,  10,  5,   -22, 8,   23,  -16, -4,  6,   -37, 50,
  -38, 16,  2,   -14, 12,  -6,  4,   4,   -10, 10,  -20, 18,  -9,  0,   30,
  -34, 20,  -6,  -2,  33,  -45, 24,  -29, 34,  -19, 2,   0,   -1,  -3,  12,
  -1,  -10, 12,  -10, 27,  -24, 12,  0,   -30, 30,  -20, 7,   13,  -14, 4,
  -3,  -25, 40,  -30, 11,  -50, 50,  -42, 26,  2,   -8,  20,  -20, 52,  -72,
  58,  -27, 31,  -32, 18,  -2,  2,   -4,  6,   -4,  15,  -19, 14,  -5,  -4,
  4,   -2,  1,   2,   3,   -7,  6,   -12, 14,  -6,  -8,  -12, 12,  -11, 12,
  -20, 22,  -17, 12,  38,  -44, 26,  -10, -9,  15,  -14, 8,   22,  -28, 20,
  -8,  -18, 20,  -14, 6,   31,  -40, 25,  -10, -14, 34,  -37, 21,  -4,  -13,
  26,  -20, 22,  -24, 18,  -6,  -19, 26,  -20, 10,  6,   -10, 11,  -7,  4,
  -2,  0,   2,   -5,  -2,  4,   -4,  16,  -20, 16,  -6,  -6,  -4,  12,  -4,
  42,  -69, 66,  -30
};

static const int32_t mdt4x8_mode3[1024] = {
  1,   3,   3,   6,   5,   8,   9,   14,  10,  10,  15,  24,  12,  14,  24,
  32,  14,  22,  29,  31,  20,  28,  32,  32,  26,  32,  32,  30,  32,  34,
  30,  28,  0,   2,   7,   14,  8,   17,  23,  26,  21,  28,  32,  24,  28,
  33,  32,  10,  30,  32,  14,  -15, 22,  13,  -11, -30, 9,   -10, -29, -30,
  -10, -26, -34, -28, 0,   12,  16,  12,  12,  25,  26,  9,   30,  37,  19,
  -14, 38,  23,  -20, -34, 22,  -16, -38, -15, -8,  -32, -14, 15,  -23, -16,
  14,  30,  -12, 12,  30,  31,  2,   26,  22,  0,   36,  48,  16,  -14, 50,
  16,  -23, -20, 12,  -30, -24, 2,   -28, -24, 12,  20,  -14, 16,  24,  8,
  12,  22,  2,   -20, 11,  -4,  -24, -31, -2,  -17, -15, -2,  -20, -18, 4,
  20,  -16, 10,  28,  17,  13,  18,  2,   -5,  3,   -22, -18, 9,   -42, -28,
  22,  26,  -26, 25,  31,  -23, 24,  26,  -27, -59, 10,  22,  6,   -8,  34,
  18,  -16, -7,  13,  -16, -4,  36,  -10, -3,  38,  51,  -6,  2,   16,  16,
  -32, -30, -6,  6,   -58, -28, 6,   5,   -32, 3,   9,   0,   -32, -36, -4,
  3,   -52, -7,  14,  -16, 0,   34,  -9,  -18, 27,  -2,  -14, 26,  2,   -6,
  23,  46,  -3,  12,  21,  22,  -18, -18, -7,  3,   -48, -31, 1,   5,   0,
  4,   3,   -27, 10,  4,   -28, -54, 1,   -12, -33, -30, 16,  24,  2,   -2,
  59,  29,  -6,  4,   41,  -13, 0,   18,  -8,  0,   21,  2,   -2,  13,  -13,
  -36, -41, -33, 16,  10,  -36, 22,  18,  -19, 15,  10,  -26, 9,   4,   -22,
  5,   29,  -1,  4,   10,  -24, -3,  -19, -36, -36, -6,  -9,  -2,  -3,  42,
  48,  17,  -12, 4,   0,   -24, -44, 1,   -18, -45, -29, 20,  18,  -1,  12,
  53,  17,  8,   11,  2,   -26, 0,   -4,  -30, -1,  3,   -30, 10,  22,  -20,
  -14, 26,  -8,  -7,  44,  40,  0,   -22, 20,  24,  -22, 20,  22,  -14, 4,
  -4,  -49, 3,   -1,  -26, 12,  28,  6,   29,  42,  -2,  -6,  -6,  -34, -32,
  -3,  -16, -32, 18,  30,  12,  14,  20,  -4,  -36, 10,  4,   -27, -14, 22,
  27,  -6,  -18, -12, 41,  -2,  -4,  -2,  -22, 9,   24,  -30, -14, 36,  -20,
  -14, -5,  0,   22,  50,  -24, 10,  14,  -44, -60, 9,   12,  -2,  2,   0,
  -11, 29,  12,  -37, -9,  14,  4,   -6,  -16, -32, 26,  10,  12,  -14, -2,
  20,  35,  -28, -40, 38,  10,  -22, -28, 12,  6,   18,  25,  16,  58,  52,
  -14, -4,  10,  -16, -43, -22, -30, 0,   28,  18,  0,   18,  18,  -8,  4,
  -18, -36, 6,   14,  -12, 0,   18,  5,   20,  10,  -27, -13, 6,   16,  22,
  10,  -32, -6,  14,  25,  -46, -42, 29,  36,  -7,  -9,  10,  10,  0,   -18,
  -12, 6,   -16, 3,   30,  4,   -38, -6,  20,  22,  -14, -38, 24,  32,  -14,
  21,  -52, -19, 14,  10,  8,   16,  -26, 22,  16,  -4,  -26, -30, 5,   30,
  -16, -12, 40,  10,  -40, -21, 0,   22,  10,  -28, 20,  21,  -8,  6,   -16,
  -20, 33,  -2,  29,  21,  -6,  -30, 5,   -10, -5,  -3,  -14, 2,   -18, 21,
  20,  27,  -54, -32, 35,  40,  10,  -29, 1,   1,   29,  3,   -33, -30, -18,
  12,  29,  9,   1,   46,  12,  -9,  -24, -27, 10,  9,   -1,  -8,  14,  -6,
  44,  12,  -50, -30, -6,  26,  8,   5,   -34, 14,  26,  26,  24,  -35, -27,
  -16, -2,  20,  3,   -6,  4,   -44, 7,   1,   -38, 27,  10,  8,   6,   -28,
  10,  26,  -28, -18, 6,   -9,  5,   13,  5,   20,  -4,  -26, 22,  -1,  -4,
  -25, -12, -18, 58,  44,  -22, -19, -10, -14, -12, 16,  48,  28,  -32, -36,
  -28, 14,  22,  13,  8,   -19, 22,  -3,  -2,  -6,  -34, -2,  -14, 18,  26,
  44,  -2,  -13, -42, -22, -2,  12,  24,  12,  -14, -2,  52,  14,  12,  -40,
  -25, -20, 10,  16,  22,  12,  -28, -6,  -11, 18,  16,  -28, -4,  -5,  -2,
  45,  -2,  -16, -3,  -42, 20,  16,  10,  12,  4,   -46, 18,  6,   7,   22,
  -14, 0,   -18, -20, 14,  -1,  46,  -12, 18,  -22, 5,   -35, -13, -4,  18,
  55,  -10, 2,   -60, 22,  -26, 24,  -9,  34,  9,   -4,  -15, 0,   -4,  7,
  9,   -16, -22, -20, 0,   46,  -6,  24,  -46, -6,  4,   0,   52,  -27, 20,
  -33, 10,  -20, 2,   14,  -9,  44,  -30, 0,   -32, 6,   14,  8,   8,   -19,
  7,   8,   -8,  -22, 0,   -14, 54,  -22, 34,  -23, -2,  -10, -32, 4,   -12,
  42,  -2,  16,  -44, 10,  -14, 10,  -15, 41,  -18, 20,  -22, 2,   16,  -16,
  24,  -22, 8,   -33, 0,   -14, 6,   48,  -10, 18,  -3,  -46, -4,  0,   -2,
  50,  -8,  -13, 20,  -35, 1,   18,  -36, 27,  -15, -4,  32,  4,   -14, 16,
  -26, -5,  12,  -22, 20,  24,  -57, 43,  -19, 18,  6,   -3,  3,   -11, -4,
  -4,  30,  12,  8,   -4,  -34, -21, -13, 8,   36,  22,  12,  -24, -13, -20,
  6,   -4,  26,  -10, 27,  -44, 12,  -2,  12,  -32, 4,   -2,  6,   30,  -4,
  -4,  1,   -42, 22,  -12, 38,  18,  -28, -6,  -51, 40,  -4,  33,  -12, -13,
  15,  -26, 27,  -19, 2,   18,  -28, 24,  -10, 2,   -9,  -8,  20,  -2,  6,
  0,   -31, 6,   -37, 53,  2,   32,  -41, 14,  -28, -4,  -4,  16,  24,  22,
  -20, 10,  -28, -10, -14, 31,  6,   28,  -41, 18,  -10, -2,  12,  -40, 42,
  -8,  30,  -16, -34, -7,  -4,  30,  18,  -4,  1,   -36, 0,   -2,  21,  14,
  2,   -2,  -28, 0,   2,   4,   40,  -47, 32,  -22, 26,  -22, 0,   9,   -10,
  33,  -28, 6,   -50, 36,  -2,  25,  -20, 20,  -20, 5,   -28, 24,  10,  13,
  -16, 15,  -24, 8,   -35, 22,  14,  12,  25,  -47, 19,  -18, 15,  4,   -10,
  -18, 30,  -26, 13,  6,   -36, 41,  -30, 9,   8,   -14, 22,  -14, -20, 22,
  -29, 34,  -14, 8,   18,  -26, 12,  -12, -10, 24,  -25, 25,  11,  -12, 22,
  -44, 16,  11,  -10, 10,  -4,  -19, 12,  -10, -4,  26,  -36, 40,  -10, -20,
  24,  -33, 17,  25,  -40, 50,  -25, -8,  16,  -36, 26,  10,  -11, 26,  -20,
  -6,  2,   -14, 14
};

static const int32_t mdt4x8_mode4[1024] = {
  2,   4,   5,   0,   6,   8,   7,   2,   20,  14,  7,   4,   28,  24,  12,
  8,   26,  34,  26,  14,  23,  34,  36,  28,  20,  32,  37,  36,  18,  26,
  34,  36,  -21, -12, -4,  -2,  -30, -34, -18, -8,  -17, -37, -40, -21, 3,
  -16, -41, -41, 12,  6,   -24, -42, 16,  18,  -1,  -27, 15,  21,  16,  -2,
  10,  18,  22,  16,  4,   10,  4,   8,   -14, 4,   17,  20,  -38, -17, 24,
  35,  -28, -34, 8,   40,  4,   -28, -14, 23,  28,  4,   -18, -6,  31,  36,
  -2,  -22, 18,  41,  24,  -16, 20,  18,  10,  -10, 42,  42,  14,  -12, 33,
  35,  14,  -5,  -4,  4,   -3,  -6,  -10, -8,  -28, -37, 4,   8,   -26, -58,
  10,  12,  6,   -24, 0,   4,   25,  31,  -4,  14,  14,  11,  -23, -1,  34,
  27,  -11, -24, 24,  42,  30,  -4,  -11, 23,  30,  36,  -16, -16, -6,  31,
  6,   -31, -35, -9,  14,  -10, -32, -38, -8,  2,   -14, 4,   -3,  -18, -8,
  8,   -2,  -28, 19,  13,  0,   -24, 46,  12,  6,   -5,  46,  15,  0,   14,
  25,  12,  -14, -2,  7,   16,  -20, -48, 1,   12,  -10, -68, -7,  -17, 16,
  36,  14,  -36, 2,   61,  30,  2,   -14, 34,  2,   46,  11,  -14, -12, 12,
  22,  -22, 5,   -13, -8,  -18, 22,  -4,  -18, -24, 26,  17,  -11, -12, -6,
  30,  15,  -21, -13, 19,  32,  -13, 28,  -22, -4,  21,  38,  -8,  -46, 13,
  -24, 4,   -12, -8,  -40, -32, 16,  12,  15,  -16, -10, 16,  36,  36,  -4,
  -13, 35,  22,  4,   -4,  3,   28,  18,  -2,  -38, -4,  16,  -2,  -20, 3,
  1,   -30, 21,  20,  14,  -46, 40,  2,   9,   7,   32,  -16, -30, 35,  14,
  -4,  -44, -12, 58,  -18, -29, 12,  46,  0,   -30, 5,   -6,  -16, 3,   -5,
  -6,  -11, -21, 16,  -6,  22,  -6,  -4,  -21, 13,  46,  -15, -12, 6,   34,
  -16, 15,  16,  -10, -42, -32, -3,  -26, -39, 2,   -20, -17, -38, 16,  -22,
  4,   15,  -19, 0,   20,  48,  -21, 26,  20,  0,   12,  21,  12,  -40, 34,
  -17, -10, -5,  15,  -14, -28, 18,  22,  26,  6,   -18, 0,   -2,  12,  -14,
  4,   -38, -12, 5,   -22, 20,  0,   -6,  -40, 28,  44,  -12, 6,   -2,  -8,
  10,  -10, 14,  -14, -10, -60, 12,  48,  -24, 8,   12,  31,  -2,  35,  4,
  0,   16,  38,  -10, -54, 11,  -5,  -28, -40, 14,  6,   -28, 2,   21,  38,
  18,  11,  18,  20,  11,  -6,  2,   -20, -40, -21, -2,  -44, 4,   30,  -4,
  -20, 10,  34,  0,   -7,  40,  -3,  -12, -38, 2,   0,   -14, -34, -10, 13,
  -8,  -6,  18,  47,  -13, -4,  22,  41,  -12, -4,  3,   -26, -33, -24, -44,
  -21, -8,  13,  -16, -4,  -8,  19,  22,  32,  24,  -2,  12,  -22, 24,  2,
  -12, -32, -40, 28,  -23, 7,   14,  2,   14,  -3,  43,  -44, 12,  5,   -28,
  -14, 35,  8,   -54, 41,  -32, 1,   -4,  -4,  -10, -14, 37,  -30, 14,  22,
  -21, 34,  -6,  -21, -2,  -4,  -1,  -20, 16,  -36, -9,  34,  8,   22,  12,
  -4,  -13, -32, -26, 36,  9,   26,  25,  -18, 9,   -4,  10,  -22, 2,   -5,
  -52, 26,  6,   9,   29,  4,   -12, -24, 35,  -9,  -2,  -6,  -32, -30, 26,
  -7,  32,  22,  -20, -1,  0,   42,  30,  4,   -8,  15,  -11, 9,   -24, 6,
  -48, -27, 27,  -7,  22,  3,   30,  -35, 35,  33,  -24, -9,  -18, -1,  -40,
  23,  15,  -6,  21,  -2,  -4,  -8,  -24, -33, 14,  -9,  19,  29,  -14, 22,
  8,   0,   12,  -38, -5,  -44, 2,   23,  -4,  37,  -2,  29,  8,   -2,  10,
  -49, -34, -9,  -22, 34,  8,   20,  8,   -6,  -12, -6,  -25, 33,  -18, 25,
  2,   -56, 36,  -12, 10,  1,   24,  -40, -9,  14,  15,  -7,  38,  -17, -2,
  24,  -12, 27,  -18, -30, -19, -24, 9,   15,  19,  19,  -2,  17,  -18, -43,
  37,  -48, 4,   -21, 28,  -52, 26,  0,   28,  -3,  38,  18,  -4,  12,  -13,
  10,  -31, 0,   -18, -5,  -16, 24,  -2,  -8,  12,  1,   0,   -6,  -27, -26,
  -3,  -6,  34,  4,   2,   -4,  2,   -8,  32,  6,   -3,  0,   -32, -39, 36,
  -29, 17,  14,  10,  -36, 32,  36,  -28, 46,  -14, 1,   -21, 4,   -14, 28,
  13,  -42, 0,   -16, -28, 39,  10,  18,  18,  -26, -1,  21,  -27, 30,  -12,
  2,   -30, 11,  12,  12,  4,   8,   -40, 13,  -44, 19,  29,  -22, 22,  8,
  -18, 45,  -54, 51,  -54, -18, -32, 18,  6,   0,   8,   20,  -16, 8,   -1,
  -6,  13,  -10, -14, 12,  -10, -2,  24,  -16, 8,   4,   -15, 6,   0,   24,
  -20, 17,  -10, 4,   20,  8,   -16, -28, 0,   -37, 22,  34,  -5,  38,  2,
  -26, -6,  4,   -22, 20,  -12, -22, -5,  -4,  10,  47,  24,  26,  -44, -6,
  -38, -24, 12,  16,  10,  8,   38,  -19, 24,  -22, -14, -11, -2,  3,   28,
  -12, -4,  -25, 40,  -20, 24,  -8,  -4,  -29, -2,  -25, 61,  -20, 9,   9,
  -5,  -22, 28,  18,  -18, 20,  -28, 20,  26,  6,   -1,  -14, -42, -10, -4,
  2,   54,  -5,  8,   8,   -40, -1,  6,   -36, 48,  -22, -3,  37,  -10, 4,
  19,  -32, 6,   -18, -16, 8,   14,  -12, 18,  16,  -24, -13, -36, -24, 24,
  -1,  32,  24,  -11, 0,   0,   -16, 15,  -10, -19, -8,  8,   -16, 36,  -5,
  30,  -16, -16, -25, 27,  -24, 20,  -18, 44,  -48, 17,  24,  -15, 18,  38,
  -4,  -20, 14,  -60, 4,   3,   -8,  26,  -4,  3,   4,   4,   16,  -12, 5,
  -16, -28, 24,  -20, 26,  17,  -3,  15,  -23, -30, 36,  -42, 24,  -24, 32,
  -2,  -4,  20,  -6,  -30, 26,  -20, 8,   34,  -20, 28,  -2,  -43, 9,   -19,
  -18, 43,  -6,  12,  24,  -38, 4,   0,   -26, 30,  0,   -16, 28,  -22, 4,
  0,   6,   -26, -16, -7,  -9,  22,  35,  18,  16,  -9,  -36, -34, -26, -8,
  28,  38,  40,  13,  -18, -38, -29, -30, 18,  30,  18,  20,  -7,  -11, -7,
  -8,  4,   8,   6,   22,  12,  -14, -14, -32, -25, 18,  19,  33,  35,  -18,
  -22, -30, -38, 18,  18,  30,  38,  -15, -20, -16, -38, 14,  14,  8,   30,
  2,   -17, 8,   -18
};

static const int32_t mdt4x8_mode5[1024] = {
  6,   5,   2,   4,   13,  12,  8,   10,  18,  18,  15,  18,  22,  26,  26,
  24,  22,  32,  34,  26,  15,  32,  36,  30,  9,   26,  33,  33,  4,   18,
  29,  36,  -2,  -6,  -3,  -14, -3,  -6,  -9,  -35, 2,   1,   -23, -50, 6,
  7,   -36, -47, 4,   8,   -32, -30, -2,  6,   0,   -7,  -4,  10,  35,  22,
  -4,  14,  50,  38,  -4,  -2,  2,   6,   7,   -6,  -2,  10,  22,  -2,  -2,
  2,   28,  15,  0,   -18, 31,  32,  -2,  -35, 30,  41,  -6,  -44, 25,  36,
  -10, -50, 14,  20,  -6,  -38, -14, -3,  2,   1,   -32, -16, -2,  5,   -38,
  -37, -6,  17,  -28, -46, -8,  23,  -10, -28, -2,  13,  5,   12,  10,  -2,
  21,  42,  20,  -5,  36,  48,  24,  -4,  26,  13,  -3,  -12, 38,  30,  -6,
  -28, 6,   34,  -4,  -26, -35, 21,  8,   -8,  -46, -7,  22,  8,   -22, -13,
  28,  -2,  12,  6,   18,  -28, 33,  27,  2,   -34, -3,  6,   10,  0,   -33,
  11,  29,  0,   -48, 13,  43,  -10, -39, 19,  45,  -28, -15, 18,  17,  -38,
  15,  6,   -16, -20, 24,  -3,  -14, 22,  8,   -6,  -4,  22,  18,  18,  8,
  0,   18,  34,  26,  -6,  2,   26,  30,  -6,  4,   -6,  3,   6,   25,  -30,
  -38, 24,  30,  -18, -54, 16,  8,   13,  -24, -8,  -17, 34,  34,  -4,  24,
  14,  8,   18,  46,  12,  10,  37,  26,  -14, 8,   39,  -14, -18, -10, 6,
  -34, 5,   -26, -28, -30, 18,  -18, -29, -3,  0,   0,   -3,  24,  -14, 20,
  45,  4,   4,   21,  -6,  -19, 2,   42,  -6,  -24, -2,  29,  8,   -4,  10,
  -10, 24,  -2,  22,  -24, 11,  -18, 14,  16,  -24, -36, -9,  52,  -32, -38,
  -22, 28,  -34, 15,  45,  -18, -26, 4,   51,  -14, -36, -12, -8,  0,   -11,
  2,   -52, 4,   8,   22,  -12, 12,  -4,  9,   39,  20,  -14, -2,  12,  -6,
  -9,  -14, -37, -20, 20,  16,  10,  4,   14,  8,   18,  7,   22,  -23, 12,
  -10, 16,  -14, 8,   -47, 2,   28,  0,   -25, -8,  48,  -28, 39,  -6,  45,
  -40, 30,  2,   12,  -4,  -26, 7,   -12, -2,  6,   -23, 6,   -18, 14,  -38,
  10,  -20, 11,  -17, -9,  8,   -15, 21,  -14, 42,  -36, 40,  4,   30,  -22,
  26,  42,  -13, -14, -2,  42,  -33, -10, 0,   -18, 26,  8,   8,   -29, 20,
  28,  10,  17,  5,   38,  -12, 49,  -12, -4,  -28, 12,  -16, -22, -6,  -42,
  -10, 19,  16,  -11, 6,   12,  13,  54,  6,   -31, -9,  -20, 6,   48,  -38,
  -6,  -6,  46,  -34, 25,  6,   -18, 18,  11,  14,  -26, 31,  -14, -12, 21,
  -14, 2,   -24, 10,  -31, 4,   17,  -22, 4,   -12, 21,  -23, 30,  43,  -18,
  18,  -4,  44,  -27, 16,  -2,  -22, -19, 16,  -8,  -22, -4,  -10, -17, 14,
  10,  -14, -4,  -1,  15,  6,   22,  -30, 40,  1,   28,  -16, 21,  -60, -7,
  10,  -40, -46, -32, 6,   -2,  -29, -28, -22, 14,  24,  24,  16,  20,  20,
  36,  24,  -4,  -28, -6,  -16, -16, -9,  -40, -14, -6,  12,  2,   28,  17,
  -16, 20,  6,   -46, 22,  25,  -11, 2,   3,   12,  -22, 70,  -19, -14, 0,
  4,   -23, 8,   8,   -33, -2,  18,  -14, 36,  2,   -8,  0,   32,  -18, -4,
  16,  -40, 0,   10,  34,  50,  15,  -12, -13, -20, -11, 10,  -34, -17, -28,
  10,  3,   44,  4,   -12, 30,  8,   6,   14,  -20, -34, -11, 14,  -10, 29,
  -10, -38, 23,  -22, 10,  26,  -10, -8,  -8,  25,  16,  -38, 10,  4,   24,
  -18, 34,  -44, -2,  -4,  30,  -4,  0,   -33, -2,  27,  12,  -22, 20,  -23,
  22,  14,  24,  -41, -17, -17, -14, 43,  63,  -20, -17, 20,  -12, -4,  34,
  -2,  -14, -22, 0,   -30, 33,  -17, -14, 10,  4,   18,  28,  12,  -24, 1,
  17,  -16, 14,  -36, -40, -4,  2,   26,  19,  8,   9,   -30, 28,  -27, 36,
  -13, 26,  -16, 0,   -22, -10, 13,  9,   -13, 36,  -11, 34,  -38, 13,  -26,
  1,   -10, 12,  8,   16,  -12, 8,   15,  26,  -40, 38,  -30, 6,   -6,  -52,
  -36, -5,  2,   15,  18,  -6,  -10, 14,  28,  14,  31,  -17, -23, -29, -26,
  -20, -2,  -16, 7,   30,  16,  42,  32,  -23, 4,   -38, -15, 10,  -10, 58,
  16,  -1,  -5,  -31, -26, -12, 0,   21,  20,  2,   -4,  26,  -20, -2,  19,
  -27, 1,   12,  -10, 12,  -18, -40, -10, 28,  26,  44,  32,  -4,  -24, -12,
  -22, 2,   -22, 10,  -58, -6,  -18, -3,  23,  5,   42,  16,  18,  -6,  -54,
  -5,  -34, 8,   30,  15,  4,   -11, -8,  -4,  25,  10,  -15, 8,   -44, -8,
  11,  -2,  22,  28,  0,   54,  15,  -28, -3,  -40, -24, 8,   1,   -6,  16,
  8,   6,   42,  2,   -8,  -13, -47, -14, -20, 24,  26,  18,  28,  -21, -8,
  -12, -26, 22,  -8,  8,   9,   -33, 8,   -26, -8,  50,  22,  28,  -6,  -30,
  -49, -8,  22,  13,  30,  -22, -22, -8,  -6,  32,  13,  14,  -28, -9,  -4,
  -8,  34,  -8,  2,   8,   -28, 12,  34,  11,  -14, -20, -30, -30, 10,  2,
  32,  4,   11,  8,   -17, 18,  -6,  -12, -12, -40, 1,   0,   51,  38,  12,
  8,   -49, -30, -8,  -11, 30,  4,   4,   6,   14,  -26, -38, 25,  -33, 20,
  40,  -20, 40,  2,   -33, 8,   -42, -10, 19,  14,  22,  22,  -18, -28, -6,
  -22, 5,   32,  -6,  25,  2,   -18, 2,   -9,  -7,  6,   4,   -34, 9,   36,
  3,   24,  -13, -46, -18, -18, 31,  34,  34,  3,   -26, -18, -34, 0,   26,
  -14, 30,  -13, -10, 32,  -10, 12,  9,   -32, 7,   -14, 0,   14,  15,  -26,
  29,  -20, -19, 30,  -34, 20,  22,  -18, 21,  -12, -10, -9,  0,   -4,  -9,
  28,  -20, 21,  28,  -39, 38,  -26, -20, 28,  -33, 17,  12,  -19, 20,  -9,
  10,  -12, 9,   10,  -21, 16,  -14, -20, 36,  -20, 22,  28,  -41, 18,  -28,
  -36, 41,  -16, 30,  36,  -32, 10,  -24, -28, 20,  -6,  14,  14,  -10, 3,
  -4,  -4,  2,   -18, 14,  -25, -8,  25,  -22, 36,  10,  -26, 26,  -45, -12,
  25,  -25, 50,  14,  -18, 20,  -47, -14, 8,   -15, 34,  8,   -4,  8,   -17,
  -2,  1,   -2,  4
};

static const int32_t mdt4x8_mode6[1024] = {
  5,   8,   8,   8,   8,   11,  16,  20,  12,  20,  26,  26,  14,  26,  32,
  33,  14,  28,  34,  38,  14,  28,  36,  34,  11,  23,  29,  28,  7,   14,
  20,  22,  -2,  -4,  -8,  -10, -10, -20, -24, -22, -19, -34, -36, -30, -15,
  -24, -30, -25, 1,   1,   -3,  -4,  10,  18,  22,  17,  10,  24,  33,  35,
  16,  27,  38,  44,  -16, -26, -21, -10, -12, -26, -36, -32, 3,   -6,  -23,
  -34, 14,  23,  12,  -10, 11,  36,  41,  20,  4,   18,  26,  24,  -2,  -11,
  -18, -2,  -11, -32, -41, -29, 21,  34,  28,  16,  10,  17,  30,  34,  -21,
  -29, -10, 7,   -14, -24, -32, -26, 14,  21,  7,   -16, 20,  41,  32,  0,
  13,  12,  2,   -10, -4,  -32, -33, -24, 12,  14,  13,  8,   22,  21,  8,
  -2,  10,  9,   -18, -25, 0,   -15, -30, 4,   -22, -40, 3,   53,  -38, -35,
  24,  52,  -1,  -2,  -2,  4,   22,  12,  -16, -28, -10, -16, -16, -6,  24,
  25,  -10, -33, 34,  40,  7,   -18, -24, -25, 2,   20,  -22, -34, -12, 1,
  28,  42,  13,  -26, 32,  40,  10,  -14, -4,  -16, -14, -4,  22,  27,  16,
  -2,  26,  22,  6,   -6,  42,  38,  -10, -42, 36,  38,  -2,  -62, 8,   8,
  2,   -26, -2,  -4,  0,   -6,  -2,  0,   -4,  4,   -14, -4,  14,  26,  -38,
  -38, 2,   27,  -6,  7,   5,   10,  16,  22,  16,  10,  -4,  -10, -18, -11,
  14,  -10, -38, -26, -2,  4,   18,  30,  -34, -25, 26,  56,  -26, -26, -18,
  1,   -32, -23, 16,  54,  -38, -42, 2,   50,  11,  5,   -11, -16, 15,  26,
  2,   -22, -11, -24, -4,  12,  -3,  0,   -1,  -11, 25,  40,  10,  -26, 10,
  6,   -4,  -4,  -7,  -8,  -20, -33, 20,  -4,  -16, 2,   -8,  7,   30,  24,
  -4,  20,  6,   -36, 11,  8,   -20, -42, -6,  -8,  14,  26,  18,  25,  14,
  -8,  46,  40,  -16, -47, -25, -42, -18, 32,  4,   36,  26,  -8,  10,  6,
  -2,  8,   15,  -24, -37, 4,   2,   39,  38,  -21, -24, -6,  7,   -12, 22,
  -8,  -36, -7,  36,  16,  8,   20,  -7,  3,   24,  20,  16,  -2,  -16, 22,
  16,  1,   -14, -6,  -57, -11, 49,  -15, -50, 6,   34,  -27, 9,   6,   -18,
  15,  12,  -28, -18, 32,  6,   16,  6,   -12, 14,  2,   -30, -50, -44, -12,
  30,  13,  11,  3,   8,   30,  20,  0,   -20, -16, -60, -22, 26,  -14, -10,
  6,   5,   16,  24,  5,   -11, 20,  -20, -22, 2,   6,   -24, 18,  39,  -30,
  -17, -8,  1,   -2,  50,  0,   -48, 12,  32,  -6,  -16, 38,  -4,  12,  2,
  -19, 0,   16,  0,   -26, -20, -11, 26,  10,  21,  24,  -3,  -36, -46, -12,
  10,  -32, 20,  10,  -8,  24,  20,  -3,  -9,  20,  -2,  -14, -24, -22, 14,
  8,   -2,  30,  45,  -6,  -17, 34,  14,  -9,  -20, -36, -42, 14,  34,  -6,
  -8,  -15, 2,   8,   31,  30,  -4,  -13, 4,   -40, -28, 26,  10,  21,  4,
  2,   -13, 8,   15,  -6,  2,   -41, -46, 6,   17,  40,  44,  15,  -7,  -36,
  -21, 5,   -29, 4,   24,  -10, -28, 19,  22,  -28, -1,  -3,  10,  -4,  -28,
  -18, 30,  -16, -9,  14,  18,  -13, -49, -6,  22,  10,  -34, 30,  26,  -46,
  -33, 2,   13,  2,   23,  -10, -12, 40,  -29, 26,  30,  -42, -17, -6,  0,
  -10, 20,  12,  -2,  -6,  -7,  -6,  3,   -2,  34,  14,  -21, 10,  4,   -4,
  10,  10,  -30, 38,  28,  -60, -8,  -20, -18, -28, -16, 26,  45,  11,  2,
  -1,  -8,  -12, -22, 8,   12,  -38, -2,  -2,  5,   42,  28,  14,  -26, -16,
  -40, -17, 22,  -2,  49,  4,   -26, 13,  -20, -16, 2,   -1,  50,  8,   -26,
  14,  -36, -14, 16,  12,  24,  20,  -15, -18, -36, -23, 28,  15,  -20, 28,
  23,  -47, -28, -15, 16,  4,   -16, 11,  16,  -14, -43, 13,  62,  -22, -14,
  10,  0,   -22, -50, 17,  40,  -28, 25,  -3,  -6,  2,   -5,  -4,  4,   0,
  6,   8,   -32, 10,  30,  -3,  -8,  20,  22,  -16, -8,  4,   -25, 8,   15,
  6,   -4,  22,  14,  -36, 12,  -46, -20, 34,  0,   42,  28,  -10, 0,   -30,
  -40, 8,   -10, 24,  30,  2,   20,  -13, -44, 4,   8,   4,   -5,  19,  -10,
  -28, -8,  -31, 22,  6,   42,  30,  -32, 2,   -40, -32, 10,  0,   34,  26,
  38,  -40, 14,  -33, -4,  -5,  11,  4,   0,   15,  -18, 12,  -8,  -5,  16,
  -12, -14, 8,   -24, -16, 2,   13,  12,  26,  14,  -22, 14,  -36, -2,  -10,
  14,  -2,  4,   40,  -37, 30,  -48, 7,   -11, -29, 44,  -4,  8,   34,  -29,
  12,  -2,  -20, 0,   -10, -9,  0,   16,  4,   13,  14,  -2,  -28, 10,  -40,
  29,  8,   10,  32,  -58, 27,  -39, -24, 23,  2,   18,  31,  -6,  -25, 18,
  -41, 14,  -10, 8,   14,  -30, 28,  -10, -1,  -12, 8,   8,   -2,  -1,  -11,
  18,  -18, -16, 16,  -10, 9,   -2,  -6,  21,  -8,  48,  -67, 50,  -34, 10,
  -8,  6,   14,  -17, 22,  -24, 6,   -16, 34,  -32, 16,  -8,  22,  -28, 14,
  18,  -31, 20,  -4,  54,  -55, 35,  -12, 12,  -28, 16,  -8,  9,   10,  -12,
  13,  -21, 12,  -10, 2,   4,   13,  -21, 10,  30,  -30, 20,  -8,  -26, 34,
  -29, 10,  -27, 29,  -34, 21,  24,  -27, 32,  -16, -1,  1,   -11, 6,   2,
  -16, 25,  -10, 38,  -34, 28,  -15, -10, 14,  -22, 14,  -12, 18,  -19, 8,
  -6,  -1,  -1,  -6,  17,  -10, 12,  0,   -8,  -2,  7,   -8,  28,  -26, 20,
  -4,  -8,  -5,  7,   -4,  35,  -51, 44,  -18, 30,  -51, 50,  -21, -26, 42,
  -38, 6,   -31, 53,  -36, 26,  -30, 32,  -34, 0,   -20, 36,  -18, 19,  -8,
  8,   -8,  -10, -10, 15,  -10, 12,  -10, 7,   -4,  -4,  4,   -8,  9,   -1,
  -36, 40,  -32, 19,  36,  -46, 40,  -26, -28, 37,  -32, 20,  13,  -16, 12,
  -10, -10, 8,   -6,  4,   -4,  6,   -9,  6,   13,  -17, 19,  -8,  -11, 13,
  -20, 12,  8,   -6,  1,   -4,  2,   1,   0,   6,   12,  -17, 12,  -15, -18,
  26,  -26, 22,  22,  -29, 28,  -22, -21, 32,  -27, 22,  22,  -32, 27,  -24,
  -26, 41,  -44, 29
};

static const int32_t mdt4x8_mode7[1024] = {
  2,   2,   2,   7,   2,   3,   8,   12,  2,   8,   12,  16,  4,   8,   18,
  32,  5,   18,  34,  44,  9,   26,  39,  44,  14,  28,  38,  36,  18,  30,
  32,  26,  0,   1,   3,   14,  0,   3,   13,  30,  2,   13,  32,  45,  9,
  28,  42,  38,  16,  31,  28,  9,   13,  11,  -4,  -22, 4,   -9,  -26, -33,
  -12, -26, -34, -33, 2,   14,  30,  41,  9,   27,  42,  42,  16,  32,  34,
  14,  14,  18,  -3,  -22, 4,   -10, -28, -28, -8,  -22, -22, -6,  -11, -16,
  2,   23,  -4,  11,  30,  32,  8,   23,  36,  42,  18,  33,  32,  10,  16,
  7,   -16, -33, -2,  -23, -34, -10, -15, -17, 8,   26,  -4,  17,  31,  18,
  16,  18,  0,   -24, 1,   -14, -33, -40, -4,  -22, -32, -18, -20, -32, -1,
  28,  -10, 26,  41,  6,   23,  25,  -14, -31, 5,   -27, -31, 7,   -19, -16,
  21,  29,  0,   26,  22,  -15, 17,  10,  -24, -38, -8,  -32, -30, -1,  -27,
  -18, 20,  17,  2,   31,  11,  -32, 10,  -4,  -29, -10, -5,  -5,  19,  28,
  8,   32,  16,  -16, 15,  -12, -40, -8,  -25, -34, 13,  52,  32,  54,  16,
  -32, 27,  0,   -28, -11, -12, -8,  18,  16,  8,   24,  2,   -14, 8,   -14,
  -18, 18,  -8,  -6,  27,  35,  2,   -11, -10, 2,   -41, -48, -5,  28,  -8,
  -2,  11,  -14, 2,   16,  -2,  -39, 22,  34,  -2,  -2,  30,  5,   -1,  54,
  -2,  -40, -2,  45,  -36, -36, 0,   -16, -26, -12, -15, -22, 14,  19,  7,
  8,   10,  19,  0,   -12, 9,   -1,  -12, 14,  2,   -6,  16,  48,  -12, -24,
  -6,  7,   -39, -38, -8,  -23, -8,  26,  12,  -40, 35,  41,  -14, -24, 34,
  8,   4,   29,  -15, -18, -25, -26, 5,   17,  13,  32,  19,  0,   2,   40,
  -31, -50, -6,  16,  -43, -19, 6,   10,  -5,  -12, -5,  30,  -19, -31, 8,
  22,  -37, -11, 3,   -22, 15,  16,  8,   34,  -12, -38, 2,   42,  -54, -44,
  0,   1,   -27, -15, -10, 6,   6,   -4,  10,  38,  -22, -29, 0,   -2,  -32,
  -14, -16, -21, 14,  16,  6,   14,  48,  48,  -24, -48, 22,  -2,  3,   22,
  8,   24,  16,  -26, 8,   -9,  -21, -12, 0,   18,  26,  12,  23,  12,  -24,
  -20, -9,  -24, -2,  -2,  18,  36,  12,  -24, 25,  20,  18,  32,  -36, -48,
  -16, -11, -16, 18,  -1,  4,   36,  -8,  -14, 32,  -24, -27, 11,  -16, -4,
  18,  -12, -16, 9,   -11, 16,  48,  -24, -12, 2,   -32, 30,  2,   -42, -8,
  18,  11,  23,  26,  2,   -10, -22, -24, 6,   4,   6,   26,  12,  8,   18,
  -13, -54, -30, -10, -20, 12,  36,  18,  33,  10,  -40, -22, 12,  -64, 8,
  26,  -26, 19,  8,   -14, 24,  -26, -17, 16,  -21, 2,   18,  -4,  -2,  0,
  -8,  8,   26,  -24, -2,  -30, -13, 58,  0,   -12, 22,  -8,  3,   24,  -27,
  4,   -6,  -6,  1,   16,  6,   8,   -10, -22, 12,  28,  -11, -52, -2,  -24,
  40,  34,  -16, -48, 22,  48,  -1,  -4,  -34, -4,  21,  22,  20,  -12, -10,
  -8,  -4,  24,  12,  6,   -12, -40, -2,  34,  -18, -18, 16,  14,  -32, -27,
  -4,  40,  15,  -36, 7,   -10, -5,  0,   -20, -34, 32,  38,  20,  5,   -36,
  -23, 8,   10,  7,   -32, 21,  50,  -56, -46, 0,   28,  9,   -16, 9,   -9,
  14,  13,  -22, -26, 1,   20,  16,  18,  -12, 8,   -5,  0,   -7,  -24, 14,
  30,  -4,  8,   -18, -26, 21,  -11, 0,   15,  5,   5,   -8,  -16, -16, -2,
  24,  36,  -18, -34, 2,   18,  -13, -38, 4,   16,  8,   1,   -4,  -14, 13,
  -14, -16, -19, 44,  59,  -20, -52, 16,  -2,  -6,  7,   -6,  3,   13,  9,
  -21, -20, 3,   30,  -15, -27, 16,  24,  -28, -22, -1,  28,  -7,  -42, 24,
  38,  -48, -42, 4,   32,  -2,  -36, 11,  11,  -12, -28, 10,  -2,  24,  30,
  -28, -50, 20,  32,  13,  10,  -18, 10,  -11, -4,  2,   -20, 14,  16,  6,
  16,  -22, -24, -6,  -12, 26,  46,  -34, -32, -1,  -14, 28,  22,  4,   16,
  0,   -50, -6,  -15, 0,   61,  -4,  -12, 22,  -30, 8,   2,   -38, 4,   20,
  -12, 52,  -9,  -21, -4,  -34, 16,  16,  0,   20,  -4,  -8,  9,   -12, 14,
  -17, 2,   16,  10,  8,   -17, -37, -16, 26,  36,  29,  -14, -33, -52, -2,
  25,  48,  17,  -10, -42, -10, -10, 14,  24,  -4,  2,   -14, 3,   -9,  16,
  -6,  22,  -29, -6,  6,   12,  28,  19,  -24, -38, -20, -2,  32,  42,  6,
  -3,  -36, -26, -10, 13,  44,  24,  -4,  -42, -14, 10,  0,   31,  0,   -1,
  -2,  -22, 13,  -16, 20,  -22, 5,   -24, 18,  7,   -7,  12,  -47, 30,  -11,
  21,  22,  -34, 29,  -48, 46,  -34, -2,  1,   -8,  28,  -12, 8,   -28, 14,
  -2,  10,  0,   -6,  4,   14,  -27, 28,  -16, 33,  -42, 26,  0,   6,   9,
  -25, 14,  -20, 35,  -26, 8,   -14, 10,  8,   -10, -4,  -20, 21,  -7,  34,
  -22, -2,  8,   -26, 46,  -40, 16,  -14, 8,   -2,  -1,  25,  -42, 38,  -18,
  10,  2,   -20, 17,  -22, 46,  -23, 1,   -24, 0,   6,   3,   2,   11,  -22,
  9,   -20, 6,   16,  -20, 29,  -48, 48,  -16, -16, 22,  -21, 10,  -5,  3,
  16,  -27, 0,   -12, 18,  9,   4,   8,   -18, -11, -5,  -12, 48,  -16, 38,
  -58, 18,  1,   -8,  46,  -44, 20,  -18, 11,  8,   -12, -31, 45,  -38, 17,
  -4,  -23, 36,  -32, 27,  -19, 16,  12,  -12, -12, 8,   -12, 40,  -26, 8,
  6,   -21, 24,  -18, 3,   20,  -26, 18,  -1,  -6,  18,  -30, 14,  -12, 16,
  -16, 10,  -4,  7,   -9,  3,   -22, 34,  -23, 3,   -11, -8,  22,  -14, 4,
  -12, 14,  -5,  24,  -47, 45,  -23, 40,  -48, 37,  -14, 24,  -22, 16,  -3,
  -28, 29,  -18, 6,   24,  -22, 20,  -11, -28, 38,  -30, 16,  20,  -32, 22,
  -14, -19, 48,  -46, 24,  -11, 2,   12,  -14, -9,  22,  -24, 18,  -10, 10,
  -4,  -4,  -12, 28,  -30, 14,  -30, 44,  -30, 12,  -25, 34,  -42, 16,  -30,
  50,  -30, 4,   -9,  -3,  7,   -1,  -12, 18,  -20, 12,  -8,  5,   -3,  -2,
  -12, 20,  -19, 8
};

static const int32_t mdt4x8_mode8[1024] = {
  2,   2,   2,   8,   6,   6,   8,   20,  8,   7,   16,  30,  8,   12,  28,
  33,  10,  23,  34,  28,  16,  32,  34,  24,  28,  36,  28,  22,  35,  31,
  25,  22,  2,   0,   8,   12,  8,   9,   17,  20,  12,  22,  28,  16,  20,
  34,  26,  -1,  32,  32,  8,   -25, 32,  20,  -18, -38, 20,  -5,  -35, -34,
  5,   -24, -38, -29, 10,  20,  16,  3,   40,  42,  16,  -6,  56,  35,  -2,
  -16, 50,  13,  -20, -12, 29,  -11, -20, 0,   6,   -20, -6,  16,  -9,  -15,
  10,  23,  -12, 2,   22,  22,  16,  21,  4,   -15, 40,  22,  -14, -19, 36,
  -9,  -30, -8,  1,   -36, -19, 4,   -29, -24, 10,  0,   -11, 22,  18,  -14,
  32,  32,  -7,  -26, 36,  2,   -32, -32, 14,  17,  -4,  -9,  30,  6,   -24,
  0,   22,  -18, -10, 38,  -2,  -12, 34,  49,  -7,  8,   36,  22,  -14, -2,
  3,   -1,  -41, -26, -14, -1,  -52, -30, -6,  4,   13,  11,  -3,  -10, 18,
  -3,  -22, -22, 2,   -24, -20, -16, -24, -6,  10,  -7,  -12, 30,  0,   -26,
  34,  21,  -39, -14, 40,  -20, -26, 38,  14,  -16, 24,  51,  -4,  -14, -3,
  -31, -15, -10, -18, -50, -16, 8,   -28, -28, 12,  14,  -18, 14,  46,  8,
  6,   42,  46,  10,  28,  16,  16,  4,   6,   -12, -25, -23, -18, -4,  6,
  2,   -10, -26, 0,   -9,  -38, -23, -6,  -14, -22, 18,  25,  6,   14,  14,
  42,  3,   2,   -26, 2,   -31, -20, -34, -27, 2,   8,   -16, 31,  64,  16,
  -9,  -58, -24, 18,  2,   -55, 16,  12,  -4,  22,  26,  -29, 8,   30,  -28,
  -12, 30,  -18, -14, 28,  -5,  2,   14,  -12, -34, 4,   -4,  -21, 10,  -6,
  5,   8,   18,  4,   11,  25,  -20, -4,  32,  22,  -41, -24, 33,  12,  -16,
  -20, 26,  20,  30,  -22, 10,  9,   30,  -27, -34, -20, 10,  0,   -30, -10,
  -2,  48,  -3,  -13, -1,  34,  -8,  -12, 16,  4,   -30, -5,  30,  -17, 2,
  -2,  10,  23,  2,   -26, 21,  25,  -38, -4,  28,  -18, -18, 4,   -16, 6,
  7,   -41, 0,   34,  -24, -20, 56,  -28, -27, -30, -30, -6,  -28, -30, -22,
  42,  6,   16,  -6,  26,  34,  28,  -28, -16, 11,  -2,  -12, -44, 9,   8,
  20,  -13, 20,  -10, 16,  20,  -24, -18, 13,  -30, 15,  -18, -10, -21, 8,
  -19, 20,  12,  -18, -8,  50,  5,   -14, -5,  16,  10,  -8,  -36, 2,   21,
  -30, -22, 48,  32,  -22, 6,   18,  26,  -26, -13, -32, -16, 28,  32,  -43,
  -8,  32,  3,   -10, -14, 0,   9,   46,  -32, 11,  -4,  -9,  12,  -10, -28,
  -34, -4,  -2,  32,  -11, -5,  36,  0,   -13, -14, -15, -10, 48,  -17, -32,
  -22, -14, 28,  -20, -12, 0,   30,  28,  23,  10,  -37, 25,  2,   18,  -31,
  -35, -24, 20,  34,  -24, 6,   -22, 26,  -8,  -8,  -28, -17, 21,  28,  4,
  44,  -44, 0,   -17, 14,  -11, 14,  -17, -24, 40,  -10, 28,  4,   2,   -4,
  28,  -2,  -22, 3,   -48, -10, 5,   -14, 2,   15,  16,  21,  46,  -17, -18,
  0,   -29, -28, -33, 37,  42,  29,  -4,  -7,  11,  14,  -4,  -40, -13, -42,
  15,  12,  5,   12,  3,   6,   -13, 22,  -34, 10,  8,   -24, 18,  0,   28,
  12,  7,   -46, 4,   -12, -45, -22, -34, 31,  11,  36,  -2,  0,   -4,  18,
  18,  -17, -33, -37, -8,  17,  16,  8,   -4,  18,  26,  11,  19,  -46, -29,
  -26, -2,  32,  8,   0,   2,   -42, -8,  2,   10,  32,  8,   10,  -14, -10,
  -24, 23,  -20, -8,  -12, 8,   32,  36,  -11, -32, 24,  -24, 24,  -48, -15,
  -7,  48,  4,   4,   -1,  -23, 24,  -12, -2,  8,   -19, -16, 2,   34,  -31,
  16,  -28, 28,  24,  -17, 2,   -26, 39,  -24, 2,   -46, 14,  11,  27,  12,
  -22, 16,  -9,  13,  -24, 26,  -16, 31,  -36, 6,   31,  1,   26,  -6,  -23,
  -36, 36,  -30, 32,  -30, 32,  2,   18,  -20, 8,   23,  -22, 4,   -36, 6,
  29,  0,   -18, 11,  -14, 18,  -4,  7,   -11, 30,  -40, 13,  24,  -23, 30,
  15,  -10, 4,   -12, -7,  3,   16,  -30, 24,  -4,  0,   8,   -21, -2,  6,
  -2,  8,   -2,  4,   -32, 56,  -6,  34,  -48, -46, -5,  3,   38,  -2,  -6,
  -26, 12,  -1,  6,   1,   34,  -19, 0,   -42, 14,  -11, 12,  -26, 49,  -14,
  28,  -36, 28,  -22, -10, -36, 28,  16,  43,  -18, -12, -14, -7,  -5,  16,
  4,   13,  -32, -46, -12, -6,  33,  16,  20,  10,  7,   -14, -8,  -8,  -27,
  2,   0,   4,   46,  2,   5,   -16, -36, -29, -2,  22,  24,  35,  -28, -20,
  4,   -28, 34,  24,  -10, -36, 54,  -30, 35,  -16, -32, 10,  13,  5,   -8,
  -12, -18, 30,  22,  4,   -12, -36, -23, 16,  16,  31,  -3,  -28, -10, 12,
  -15, 24,  -22, 10,  10,  7,   -55, 26,  6,   12,  44,  -19, 0,   -22, -39,
  -10, 25,  34,  22,  8,   -20, -23, 0,   -36, 33,  -8,  23,  6,   -21, 11,
  -26, 12,  6,   -4,  12,  -13, 4,   1,   -8,  40,  -16, 8,   -29, -12, 10,
  0,   22,  4,   7,   10,  -36, 23,  -30, -8,  -12, 12,  14,  29,  -2,  -21,
  -15, -21, -6,  61,  -24, 31,  -44, 8,   14,  37,  -10, 3,   -24, -42, 17,
  10,  12,  42,  -13, -3,  4,   -39, 3,   9,   -30, 26,  -7,  6,   38,  -1,
  -10, 3,   -40, -8,  14,  -12, 40,  8,   -13, 19,  -30, 2,   -6,  34,  2,
  -2,  -24, -31, 4,   18,  38,  12,  0,   -28, -40, 6,   3,   42,  18,  -28,
  6,   -48, 26,  10,  2,   28,  -38, 0,   2,   -10, 27,  -15, 3,   10,  -6,
  13,  -52, -8,  2,   11,  63,  3,   -8,  -33, -51, 4,   14,  29,  39,  -4,
  -9,  -31, -20, 1,   22,  10,  16,  -11, -10, -2,  -15, 7,   -3,  12,  -1,
  -6,  20,  -30, 8,   2,   -18, 50,  -16, 10,  2,   -52, 25,  -20, 28,  24,
  -21, 16,  -38, -1,  12,  -12, 42,  -26, 4,   0,   -23, 22,  -11, 0,   14,
  -20, 14,  14,  -16, 16,  2,   -22, 20,  -30, 4,   26,  -29, 36,  -12, -22,
  34,  -39, 17,  14,  -32, 44,  -22, -6,  20,  -34, 21,  3,   -14, 29,  -20,
  1,   1,   -12, 12
};

static const int32_t mdt4x8_mode9[1024] = {
  0,   0,   3,   11,  -1,  3,   12,  24,  2,   11,  25,  34,  6,   20,  34,
  38,  8,   24,  33,  36,  11,  24,  32,  34,  13,  26,  31,  29,  17,  25,
  26,  22,  1,   0,   2,   12,  -5,  0,   18,  25,  -5,  18,  39,  32,  10,
  36,  38,  18,  18,  29,  10,  -8,  14,  4,   -20, -27, 0,   -24, -36, -34,
  -18, -34, -35, -30, 0,   3,   10,  12,  4,   20,  33,  18,  20,  43,  28,
  -3,  30,  30,  -11, -26, 20,  -10, -37, -21, -6,  -36, -28, 0,   -18, -20,
  10,  28,  -4,  16,  35,  35,  6,   16,  23,  26,  26,  45,  40,  21,  40,
  31,  -4,  -18, 16,  -18, -30, -8,  -14, -21, 9,   16,  -8,  20,  32,  2,
  12,  26,  2,   -24, 6,   -10, -28, -32, -15, -33, -27, 4,   -34, -38, 1,
  34,  -17, 9,   32,  22,  3,   2,   -4,  -11, -24, -40, -21, -4,  -40, -22,
  12,  8,   -4,  24,  18,  -16, 24,  20,  -18, -33, 8,   12,  -6,  -42, 10,
  2,   -31, -53, 14,  20,  -4,  -14, 44,  43,  12,  4,   38,  -1,  -6,  16,
  0,   -22, 14,  20,  -10, 12,  22,  -12, 8,   14,  -20, -39, -2,  6,   4,
  -2,  0,   6,   2,   -4,  0,   4,   0,   10,  -8,  -10, 2,   40,  -22, -34,
  -2,  54,  -24, -36, 5,   41,  -32, -38, -8,  16,  -44, -37, -10, 7,   26,
  38,  20,  -1,  41,  27,  -7,  6,   10,  -30, -6,  46,  -22, -16, 30,  27,
  -8,  -10, -10, -21, -22, -37, -20, -20, -17, 9,   10,  -11, 28,  33,  0,
  -13, -28, -30, -8,  -12, -18, 2,   -4,  -27, 38,  36,  -11, 2,   23,  -16,
  6,   45,  -22, -21, 33,  8,   -11, 6,   -18, -49, -2,  -8,  -24, -18, 13,
  27,  24,  16,  -16, -9,  32,  34,  -34, 2,   41,  -8,  -36, -14, -17, -34,
  -16, -5,  -12, 20,  32,  16,  8,   30,  16,  -28, -12, -4,  -24, -15, 12,
  -18, 17,  38,  4,   -30, 28,  22,  4,   10,  -9,  -28, -7,  29,  -17, -27,
  -26, 18,  58,  3,   -32, 16,  38,  -13, 8,   4,   -20, 4,   30,  -35, -22,
  12,  -2,  -20, -18, -9,  12,  29,  7,   19,  40,  -2,  -13, -1,  14,  -37,
  -38, 3,   22,  -13, -6,  22,  7,   22,  -8,  -34, -34, 14,  -4,  0,   -6,
  -16, 48,  33,  -13, -6,  26,  -26, -9,  38,  -38, -18, 39,  28,  -23, 14,
  0,   -18, 4,   -12, -32, 2,   20,  12,  35,  0,   -2,  7,   16,  -48, -41,
  -2,  11,  -3,  -10, 14,  23,  40,  -8,  -31, -19, -6,  -41, -12, 6,   -42,
  -20, 34,  17,  -14, -2,  -2,  3,   54,  -13, -24, -28, 16,  26,  -2,  -42,
  -18, 31,  16,  18,  0,   -8,  12,  22,  -16, -28, -4,  -2,  2,   -18, -10,
  4,   22,  18,  1,   -14, -12, 9,   1,   16,  -19, -40, 22,  35,  -30, -3,
  -5,  1,   5,   -4,  -6,  39,  -12, -35, 16,  12,  -62, -32, 8,   16,  36,
  29,  4,   -2,  36,  4,   -34, -10, -8,  5,   27,  -5,  -6,  -9,  -2,  3,
  30,  -14, -24, -14, -14, 40,  6,   -16, -26, 12,  14,  54,  14,  -53, 1,
  11,  -31, -16, -33, 0,   49,  15,  -23, -28, 8,   50,  -11, -20, 8,   3,
  -12, 4,   18,  36,  -1,  -41, 12,  26,  -16, -11, 25,  14,  10,  -19, -8,
  26,  -10, -25, 22,  -24, 22,  42,  18,  -13, -4,  -22, -4,  8,   -31, -1,
  24,  33,  18,  4,   -23, -32, -14, -18, 10,  10,  24,  -4,  28,  24,  -25,
  -22, -20, -18, 27,  42,  -31, -41, -28, -22, 6,   63,  25,  -12, 14,  -30,
  -26, 10,  -16, 1,   27,  -6,  16,  19,  -30, -12, 18,  -6,  18,  8,   -36,
  6,   -8,  -7,  32,  -1,  0,   14,  -26, 27,  -6,  1,   32,  10,  -9,  3,
  -42, -18, 12,  34,  1,   8,   -24, 0,   18,  6,   -16, -12, -41, 0,   44,
  34,  22,  -43, -30, -26, 10,  21,  17,  -8,  -2,  18,  -28, -19, -2,  11,
  2,   32,  -18, 14,  -39, 26,  -24, 31,  -20, 10,  21,  -12, 45,  -34, 8,
  -44, 16,  -24, 10,  6,   12,  22,  -24, -16, -13, 24,  -4,  35,  -34, -20,
  -6,  2,   10,  39,  -4,  -8,  1,   -40, 7,   -12, 6,   29,  0,   29,  -33,
  12,  -28, -6,  -20, 20,  28,  46,  -2,  -30, -13, -22, 8,   30,  -10, -8,
  7,   18,  12,  15,  -22, -23, -10, 0,   43,  -4,  16,  -42, 12,  -48, 18,
  17,  44,  -6,  -7,  -56, -4,  12,  4,   20,  0,   -14, -4,  -2,  -10, 34,
  -20, 18,  -32, 16,  12,  12,  -4,  -1,  -34, 3,   -7,  24,  42,  5,   -22,
  -7,  -44, 18,  -15, 34,  25,  8,   -14, -2,  -19, 10,  -22, 35,  -4,  29,
  -46, 26,  -10, -11, 36,  -20, -7,  -30, 7,   -10, 26,  17,  1,   -2,  -32,
  -8,  -12, 28,  21,  10,  -8,  -24, -16, 4,   1,   36,  -8,  10,  -44, 26,
  -14, 41,  -40, 36,  -14, -6,  14,  34,  -27, -9,  -25, -4,  16,  20,  4,
  30,  -22, -14, -46, 34,  -16, 56,  -23, 4,   14,  -20, 20,  -18, -3,  -8,
  28,  -24, 22,  -21, 4,   12,  -19, -26, 9,   -8,  13,  23,  20,  -28, 14,
  -58, 38,  -9,  -4,  28,  -36, 12,  2,   8,   -7,  17,  -15, 0,   4,   -43,
  39,  0,   14,  14,  -37, 2,   -15, 13,  10,  14,  -26, 31,  -34, 22,  -30,
  24,  19,  -1,  16,  -48, 6,   -12, 30,  10,  0,   -16, -9,  -19, 7,   7,
  41,  -20, 11,  -48, 4,   6,   -10, 30,  -25, 17,  -7,  28,  -26, 21,  -4,
  -8,  21,  -26, 16,  -18, 28,  -22, 5,   0,   -17, 25,  -16, 8,   12,  -34,
  30,  -29, 26,  8,   -22, 26,  -46, 24,  0,   -11, 32,  -34, 16,  -20, -16,
  48,  -37, 44,  -44, 12,  18,  -2,  -4,  19,  -21, 18,  -17, -6,  18,  -12,
  6,   17,  -31, 14,  -30, 26,  6,   27,  -30, 16,  -11, -6,  12,  -16, 12,
  -37, 46,  -34, 10,  18,  -40, 46,  -24, 10,  -4,  -17, 17,  -10, 7,   5,
  -12, 22,  -18, 9,   4,   -26, 30,  -21, 4,   18,  -30, 27,  -8,  0,   13,
  -27, 16,  20,  -18, 16,  -5,  -21, 24,  -26, 16,  23,  -27, 23,  -16, -24,
  36,  -34, 24,  22,  -32, 34,  -24, -16, 28,  -34, 25,  6,   -16, 26,  -20,
  -1,  4,   -13, 12
};

static const int32_t mdt4x8_mode10[1024] = {
  0,   3,   3,   8,   4,   8,   12,  21,  10,  20,  24,  30,  18,  30,  34,
  31,  22,  31,  35,  28,  16,  26,  33,  28,  12,  24,  28,  26,  16,  22,
  22,  22,  -4,  6,   7,   2,   10,  22,  16,  -3,  36,  45,  13,  -14, 58,
  46,  -2,  -23, 48,  16,  -13, -20, 14,  -10, -14, -16, -11, -22, -16, -12,
  -19, -20, -15, -10, 7,   6,   -2,  -11, 28,  16,  -16, -30, 41,  6,   -38,
  -33, 25,  -15, -34, -13, -2,  -24, -7,  11,  -20, -14, 20,  32,  -18, 5,
  29,  37,  -4,  17,  30,  33,  -8,  -9,  -8,  -12, -18, -29, -20, -11, -16,
  -32, -26, -12, 20,  -3,  -27, -23, 46,  26,  -12, -32, 42,  36,  6,   -27,
  24,  30,  19,  -8,  15,  22,  17,  8,   26,  2,   -4,  -4,  53,  2,   -26,
  -10, 53,  -16, -26, 1,   11,  -10, 13,  10,  -24, 18,  35,  -2,  -7,  36,
  14,  -18, 18,  16,  -14, -30, 8,   -10, -30, -33, 0,   -7,  -10, -17, -5,
  -8,  -14, -37, -28, 7,   -6,  -44, -34, 32,  12,  -31, -12, 44,  32,  8,
  11,  19,  18,  26,  1,   -22, -12, 24,  -22, -37, -13, 14,  10,  -18, -45,
  -23, 8,   -48, -53, 4,   -4,  -26, -8,  34,  24,  17,  18,  26,  30,  2,
  -2,  14,  -8,  -38, -7,  13,  -26, -28, -2,  6,   -10, -4,  -8,  -3,  -13,
  -8,  22,  29,  -2,  -4,  10,  24,  26,  -32, -21, 18,  8,   -30, -6,  25,
  -4,  18,  2,   -8,  18,  25,  -17, -10, -4,  -30, -24, 25,  -43, -38, 15,
  52,  -2,  -29, -14, 30,  3,   -36, 2,   45,  17,  -2,  14,  5,   4,   26,
  -2,  -52, -38, 17,  2,   -45, -47, 0,   18,  -10, -14, 2,   16,  12,  8,
  7,   6,   10,  36,  20,  -6,  -10, 56,  14,  -13, -2,  2,   2,   14,  6,
  -40, 14,  28,  -10, -6,  11,  -23, -33, 30,  -18, -42, -14, 16,  -10, -8,
  21,  17,  24,  26,  30,  -50, -24, 4,   -14, -42, -10, -10, -36, 36,  7,
  1,   -18, 20,  -1,  48,  12,  -26, -6,  16,  -14, -6,  -9,  -35, -4,  19,
  -2,  -24, 7,   33,  22,  10,  14,  24,  -37, -33, 12,  15,  -34, 1,   18,
  -3,  36,  20,  -23, 12,  -4,  -22, -2,  -1,  -40, -4,  40,  16,  14,  -10,
  -4,  41,  14,  -30, -2,  21,  -25, -4,  32,  -16, -23, 12,  30,  8,   -19,
  10,  18,  36,  -22, -3,  -14, -16, -4,  -1,  -21, 2,   10,  -22, 20,  45,
  -15, -20, 60,  20,  -9,  10,  11,  -3,  14,  -8,  -54, -16, -27, -9,  0,
  0,   -16, -4,  -14, 22,  39,  -14, 4,   -38, 36,  -28, 39,  -30, 16,  -18,
  17,  18,  2,   2,   -31, -15, 0,   21,  -34, -34, 17,  34,  -6,  -32, 8,
  -26, 6,   -12, 26,  -43, 32,  6,   40,  -32, 29,  -22, -10, 8,   -26, 5,
  -39, 35,  -26, 38,  -14, 18,  0,   10,  10,  -2,  6,   -20, -4,  -11, -1,
  -13, 10,  5,   8,   -10, 20,  -10, 14,  -4,  10,  -44, 20,  -9,  30,  -51,
  22,  -5,  36,  -20, 2,   -18, -12, 1,   14,  20,  -12, -30, 14,  60,  0,
  -30, 10,  12,  -22, 8,   60,  12,  7,   1,   10,  -25, 3,   -34, -43, -8,
  -3,  14,  10,  34,  2,   44,  8,   -6,  -14, -6,  -16, -34, -14, -22, -15,
  13,  42,  10,  0,   10,  -32, -25, -6,  0,   0,   10,  -15, 6,   38,  24,
  2,   -8,  -56, -11, 28,  5,   14,  -6,  -39, 20,  24,  16,  2,   -36, -34,
  12,  28,  30,  6,   -26, -15, -46, 1,   -39, 7,   15,  35,  -27, 6,   8,
  -5,  28,  3,   -17, -24, 3,   -28, 20,  27,  -26, 31,  -24, 34,  -18, 15,
  -31, 14,  -20, -30, 6,   2,   13,  15,  -33, -34, 36,  -16, 36,  -16, 25,
  -21, 16,  -18, 9,   16,  -37, 8,   2,   -5,  33,  -18, 0,   -6,  6,   -28,
  38,  -4,  -14, 20,  -10, -16, 14,  -8,  -34, 37,  -18, -44, 24,  16,  31,
  14,  -24, -10, -34, 19,  -16, 2,   0,   7,   20,  22,  19,  -9,  -26, -18,
  -38, 22,  -26, -1,  22,  28,  24,  36,  -18, -25, -4,  -25, -4,  -42, -8,
  -58, 18,  16,  43,  12,  -10, 1,   -12, 28,  4,   -14, -30, -24, 6,   17,
  47,  7,   -16, -8,  -28, -1,  16,  -6,  -18, 9,   -12, 17,  28,  -19, -56,
  38,  -14, -12, 30,  -14, 4,   26,  0,   -16, 18,  -36, -4,  6,   -16, 14,
  1,   -5,  20,  23,  4,   -4,  -6,  -54, -4,  -9,  20,  47,  12,  -3,  -13,
  -18, -30, -3,  16,  9,   32,  6,   -24, -11, -28, -9,  31,  5,   24,  7,
  -15, 5,   -14, -21, -4,  -15, 2,   15,  48,  12,  34,  -56, -28, -14, -8,
  27,  29,  -12, -4,  30,  48,  -18, 11,  -52, -12, 5,   -6,  30,  -8,  18,
  -2,  10,  -11, -13, -1,  -24, 12,  0,   5,   48,  -29, 23,  -49, 8,   -26,
  8,   12,  10,  7,   -10, -3,  0,   30,  2,   4,   -9,  -14, 0,   1,   18,
  -10, 14,  -4,  -22, 10,  -26, 10,  8,   13,  22,  -4,  -10, -6,  -13, 12,
  -48, 56,  -32, 47,  -48, 32,  2,   -26, 25,  -7,  -16, 30,  -29, 14,  28,
  -23, 28,  -12, -33, 16,  -30, 6,   30,  -8,  31,  2,   -36, -4,  -27, -4,
  40,  12,  18,  6,   -41, -12, -9,  0,   17,  -6,  -30, 19,  -5,  17,  29,
  -17, 6,   -36, -10, 2,   6,   46,  5,   -4,  -14, -54, 7,   2,   18,  43,
  -6,  -21, -4,  -31, 6,   28,  -10, 4,   14,  -40, 24,  -12, 18,  -26, 56,
  14,  -8,  9,   -60, -8,  -8,  22,  33,  10,  6,   -36, 2,   -7,  2,   40,
  -20, 10,  -20, -26, 14,  -4,  26,  5,   2,   8,   -26, 14,  -6,  2,   18,
  24,  19,  -2,  -30, -18, -24, 0,   34,  14,  20,  0,   -40, -6,  -24, 8,
  36,  -1,  28,  -20, -18, -2,  -22, 31,  -2,  0,   14,  -36, 44,  -38, 14,
  -18, 17,  -44, 13,  19,  -13, 57,  -22, -14, 2,   -51, 24,  7,   11,  32,
  -16, -4,  -22, -20, 8,   -4,  34,  -4,  2,   8,   -31, 18,  -7,  -2,  18,
  -24, 12,  6,   0,   1,   -6,  -11, 9,   -13, 8,   17,  -14, 24,  -13, -22,
  21,  -30, 18,  21,  -24, 32,  -20, -22, 28,  -42, 25,  20,  -28, 42,  -27,
  -14, 22,  -37, 28
};

static const int32_t mdt4x8_mode11[1024] = {
  1,   2,   4,   12,  2,   8,   16,  24,  6,   14,  26,  36,  8,   20,  33,
  40,  10,  26,  36,  36,  12,  27,  34,  31,  11,  25,  29,  28,  9,   18,
  22,  20,  1,   3,   6,   15,  6,   13,  23,  28,  10,  28,  37,  28,  16,
  33,  31,  13,  12,  20,  6,   -10, 0,   -4,  -22, -30, -14, -30, -36, -32,
  -24, -36, -32, -27, 0,   6,   20,  26,  20,  41,  48,  28,  32,  44,  16,
  -12, 13,  -3,  -31, -24, -10, -32, -30, -8,  -16, -24, -8,  6,   -7,  -2,
  14,  23,  -1,  11,  24,  26,  3,   8,   15,  19,  18,  24,  20,  12,  14,
  3,   -16, -18, -12, -37, -29, 2,   -18, -14, 18,  26,  13,  40,  38,  10,
  26,  24,  -5,  -24, -6,  -26, -42, -44, -8,  -22, -24, -14, -20, -32, -8,
  10,  -1,  22,  36,  11,  22,  30,  -2,  -20, -3,  -30, -32, -3,  -18, -16,
  20,  27,  11,  32,  25,  -13, 23,  17,  -30, -50, 34,  56,  33,  -6,  40,
  32,  -12, -33, 0,   -19, -15, 6,   4,   16,  24,  14,  19,  2,   -14, -2,
  -10, -35, -2,  22,  -18, 7,   31,  4,   4,   10,  -16, -38, 1,   -2,  -16,
  -30, -2,  2,   -8,  -29, 14,  26,  -2,  -40, 34,  30,  -21, -20, 42,  20,
  -8,  18,  30,  12,  14,  28,  -4,  -8,  11,  17,  -50, -36, -6,  12,  -32,
  -42, -10, 2,   -10, 13,  8,   -31, 27,  20,  -23, -20, 12,  -10, 3,   44,
  -3,  -12, 25,  45,  -16, -30, 2,   2,   -40, -28, -2,  -14, 4,   27,  7,
  -27, -7,  -20, 10,  40,  2,   3,   22,  8,   -6,  -8,  -12, -34, 2,   14,
  -9,  -28, 52,  50,  5,   -18, 32,  6,   -10, -17, 4,   6,   10,  -12, 36,
  42,  9,   -31, -38, -42, -23, -36, 33,  45,  -5,  -16, 32,  0,   4,   32,
  -26, -22, 20,  -13, -8,  20,  -5,  -45, 16,  12,  -7,  5,   5,   2,   20,
  21,  0,   -4,  -8,  -14, -2,  14,  14,  -21, -7,  10,  -6,  -40, 28,  23,
  -12, -4,  52,  16,  4,   25,  -6,  -16, 6,   -20, 0,   24,  -11, -56, 46,
  36,  -9,  -8,  18,  10,  12,  6,   24,  22,  -30, -53, 26,  18,  -2,  2,
  7,   14,  26,  12,  -12, -14, -22, -22, 18,  15,  11,  24,  -2,  -4,  14,
  -3,  -14, 4,   -24, -60, 28,  29,  10,  26,  -31, -22, 11,  2,   0,   21,
  12,  5,   -8,  -31, -20, -4,  14,  11,  8,   -12, 29,  10,  10,  -7,  -60,
  -22, 34,  -10, -9,  37,  6,   -18, 8,   -36, -25, 44,  -34, -13, 31,  9,
  -9,  16,  -2,  -22, -14, -6,  19,  16,  -32, 4,   0,   27,  28,  -22, -64,
  33,  47,  -10, -6,  2,   17,  12,  -10, -26, 4,   -6,  -2,  24,  -2,  -11,
  -6,  46,  34,  -6,  -50, 10,  42,  -15, -26, 11,  21,  20,  22,  -18, -12,
  -12, -13, -10, 8,   4,   26,  27,  8,   -6,  -24, -40, -22, 16,  28,  12,
  -16, 4,   -14, -10, 15,  10,  -5,  19,  -6,  8,   -4,  -36, -32, 26,  20,
  -10, -26, 20,  16,  36,  -15, -36, -48, 6,   54,  32,  0,   -10, -29, 2,
  12,  -6,  -12, -3,  8,   -26, 8,   0,   4,   32,  8,   -30, -22, 30,  44,
  -12, -31, 8,   26,  8,   -5,  17,  -8,  -15, -24, 34,  46,  -30, -38, 26,
  24,  -2,  -4,  -12, 9,   -16, -1,  0,   10,  25,  32,  -44, -48, -2,  20,
  -19, -8,  24,  14,  0,   -9,  -3,  -8,  -18, -34, 25,  28,  30,  28,  -30,
  -40, 0,   6,   2,   32,  -15, 8,   -2,  12,  29,  12,  -12, -33, -30, 26,
  32,  18,  -20, -16, 4,   10,  -12, -14, 20,  9,   12,  -6,  -4,  -10, 18,
  6,   -12, -22, 26,  66,  -20, -45, 28,  56,  -32, -65, 24,  38,  -4,  10,
  2,   -11, 0,   -6,  -8,  4,   -14, -5,  48,  22,  -13, -10, -12, 10,  -25,
  -6,  -10, 18,  14,  8,   3,   8,   -23, -4,  10,  -22, -10, -2,  -10, 64,
  0,   -24, 19,  -20, -26, 22,  -16, 6,   33,  -8,  -9,  -2,  -32, 3,   36,
  4,   20,  11,  -52, -20, -10, 0,   34,  14,  -2,  4,   -12, 2,   10,  -20,
  -28, -15, 23,  23,  37,  0,   -20, -26, -44, 20,  15,  44,  14,  -34, -4,
  -32, -3,  28,  23,  -9,  18,  -22, -8,  -3,  -10, 32,  6,   -25, 20,  22,
  -14, -6,  10,  -20, 20,  24,  -32, -2,  -40, 18,  23,  32,  3,   8,   -47,
  -36, -9,  30,  26,  42,  -36, 2,   -10, 14,  -14, 20,  -7,  8,   -15, 0,
  6,   24,  -22, -7,  20,  -6,  20,  -9,  -16, 3,   -26, 18,  14,  24,  -8,
  -22, -1,  -22, 39,  -38, 32,  -31, 40,  -42, 4,   -33, 39,  -12, 5,   -14,
  6,   2,   -6,  -33, 1,   13,  10,  34,  -2,  -16, -4,  -53, 16,  20,  -6,
  44,  -25, -10, 10,  -9,  -8,  28,  -20, 8,   13,  -42, 34,  -6,  -4,  32,
  -37, 1,   0,   -7,  18,  22,  -37, 35,  -22, 29,  -34, 36,  -10, -2,  4,
  -15, 8,   -5,  8,   14,  -14, 4,   -26, 24,  -6,  20,  -2,  -17, 18,  -22,
  42,  -44, 13,  -22, 28,  -24, 12,  -5,  -1,  -2,  3,   16,  -8,  14,  -10,
  -8,  -4,  -11, 14,  -6,  39,  -46, 24,  -37, 33,  -12, -8,  -1,  -6,  20,
  -13, 18,  -28, 17,  -4,  -24, 48,  -54, 28,  -36, 33,  -22, 8,   4,   -8,
  14,  -10, 6,   -14, 4,   4,   -6,  33,  -44, 22,  -26, 12,  14,  -27, 27,
  -24, 4,   20,  -33, 38,  -32, 6,   21,  -29, 26,  -14, -20, 27,  -28, 20,
  -16, 26,  -15, -3,  -2,  -22, 46,  -25, 16,  -32, 14,  4,   18,  -12, 12,
  -12, 6,   -18, 14,  -2,  6,   14,  -39, 30,  -30, 46,  -34, 6,   2,   -8,
  32,  -21, 18,  -46, 21,  0,   46,  -43, 56,  -42, 5,   -22, 6,   25,  -10,
  22,  -12, -11, -7,  -9,  9,   1,   10,  -8,  16,  -16, -6,  -8,  15,  0,
  -32, 40,  -44, 22,  16,  -36, 50,  -33, 24,  -17, -8,  16,  -10, 2,   16,
  -18, 24,  -22, -3,  18,  -21, 34,  -29, 4,   6,   -12, 14,  -6,  1,   3,
  -10, 8,   22,  -15, 4,   -2,  -27, 30,  -18, 8,   30,  -34, 20,  -10, -30,
  44,  -30, 16,  22,  -42, 40,  -20, -9,  24,  -32, 20,  2,   -11, 14,  -12,
  2,   4,   -10, 7
};

static const int32_t mdt4x8_mode12[1024] = {
  6,   4,   4,   4,   10,  10,  10,  14,  10,  21,  28,  34,  12,  34,  58,
  59,  11,  25,  44,  34,  5,   12,  21,  17,  4,   6,   10,  11,  4,   6,
  8,   9,   16,  10,  6,   0,   17,  10,  0,   -3,  1,   -5,  -16, -18, -16,
  -32, -28, -18, -15, -13, 20,  23,  2,   15,  38,  36,  16,  34,  42,  36,
  22,  38,  34,  26,  3,   6,   4,   4,   20,  22,  14,  10,  42,  55,  20,
  -13, 42,  45,  -16, -67, 19,  17,  -4,  -16, 0,   -1,  8,   10,  -3,  -6,
  4,   8,   2,   1,   2,   4,   24,  14,  3,   -10, 43,  34,  -10, -41, 11,
  11,  -24, -52, -28, -7,  23,  -6,  -16, 5,   43,  14,  6,   8,   10,  -4,
  2,   -12, -24, -22, -12, -29, -24, -22, 24,  20,  9,   12,  28,  35,  32,
  31,  6,   26,  53,  32,  -30, -38, -4,  6,   -24, -46, -26, 2,   8,   -6,
  -14, 0,   12,  1,   -10, -12, 0,   -7,  -8,  -8,  -8,  -7,  -13, -10, -2,
  -6,  -22, -29, 20,  32,  10,  -46, 2,   18,  38,  26,  -22, -44, -31, 2,
  -24, -38, -31, 0,   -6,  4,   10,  10,  18,  32,  22,  3,   -10, -5,  -11,
  6,   -5,  4,   2,   4,   1,   12,  -6,  -14, 17,  -2,  -46, 28,  10,  -12,
  -19, 68,  -19, -19, 6,   47,  -20, -22, -6,  17,  -28, -36, -26, 12,  27,
  -2,  -16, -2,  16,  -21, -32, 12,  -19, -19, 11,  28,  -32, 17,  36,  -42,
  -24, 1,   7,   -18, -18, -34, 2,   38,  -17, -24, 10,  34,  -22, -20, -12,
  24,  11,  22,  15,  10,  -6,  21,  24,  -4,  -47, -20, 17,  -36, -24, 7,
  22,  -14, 49,  31,  -30, 22,  36,  -8,  -36, 22,  -8,  -14, -2,  4,   3,
  16,  22,  6,   16,  17,  11,  -2,  55,  42,  -10, -12, 14,  -18, -50, 29,
  10,  6,   -10, 40,  26,  10,  -38, -36, -8,  -14, -5,  -8,  -14, -2,  12,
  18,  -4,  2,   4,   17,  4,   52,  42,  6,   -37, 22,  24,  4,   -22, -22,
  -24, 4,   31,  20,  22,  -16, -8,  -36, 8,   2,   -37, -24, 18,  9,   -14,
  24,  11,  -20, 6,   -4,  -18, -18, 39,  -1,  -8,  0,   21,  -33, -18, 4,
  -8,  -12, -14, 4,   5,   58,  -4,  0,   -6,  -20, -43, 24,  36,  20,  6,
  12,  46,  32,  -3,  -18, 10,  -4,  -23, -18, 20,  2,   31,  44,  -10, -28,
  39,  30,  26,  -8,  -23, -40, 7,   6,   6,   20,  -30, -2,  10,  -20, 20,
  -2,  -20, -16, 24,  -20, 8,   34,  -18, -25, 3,   28,  12,  10,  -7,  -8,
  -26, 8,   -7,  -28, -30, 15,  38,  -28, 12,  -5,  7,   24,  12,  -16, -25,
  -52, 6,   45,  46,  7,   -4,  8,   12,  24,  -18, -30, -15, 12,  -9,  -10,
  15,  0,   9,   -5,  -24, -17, 14,  -16, -4,  16,  48,  -39, 36,  -24, 44,
  -56, 15,  12,  30,  8,   -15, 10,  18,  -11, -20, 8,   2,   -16, 5,   26,
  46,  10,  18,  -4,  12,  -46, -6,  -2,  16,  -13, 28,  -12, 4,   -3,  -23,
  15,  30,  -15, 12,  -1,  12,  -36, 44,  -16, -34, -36, 15,  -34, 6,   12,
  20,  -12, -54, 3,   7,   28,  34,  -10, -18, 42,  21,  -19, 4,   -25, -14,
  -8,  35,  -10, 8,   -2,  -33, 14,  -9,  26,  26,  -10, -23, 14,  30,  -20,
  -33, -6,  4,   -12, 25,  56,  -7,  14,  -24, -2,  -44, 6,   0,   24,  -18,
  18,  18,  -8,  0,   -3,  -28, 6,   -10, 18,  0,   46,  -16, -5,  -15, -36,
  -11, 5,   -24, 16,  41,  -18, 27,  -18, -8,  24,  -10, -5,  -16, 38,  -33,
  60,  -40, -3,  -30, 0,   4,   -2,  48,  -24, 17,  1,   -10, 2,   -2,  -28,
  -22, 24,  -4,  0,   7,   -1,  -10, 16,  8,   -16, -20, 16,  36,  24,  -10,
  32,  -49, -31, 22,  -28, 46,  10,  -8,  3,   -20, -6,  11,  6,   -32, 8,
  10,  -28, 6,   -14, -38, -2,  14,  18,  10,  24,  -2,  58,  2,   6,   8,
  -18, -46, 2,   9,   -7,  40,  -14, 4,   -9,  -25, 8,   18,  22,  24,  2,
  -17, -12, -44, -17, 17,  43,  14,  4,   6,   -16, -28, 18,  -30, -8,  56,
  -2,  20,  -4,  -8,  -38, -44, 28,  8,   20,  -8,  28,  -20, -6,  -22, -9,
  5,   16,  10,  -7,  0,   -30, 11,  -3,  19,  -16, -36, -12, 26,  34,  50,
  -29, -12, -9,  -6,  1,   10,  -8,  -6,  10,  -1,  1,   38,  -44, 26,  -12,
  -4,  40,  -24, 22,  -23, -22, -1,  -20, 22,  27,  32,  -19, -34, -17, 14,
  -2,  -2,  9,   30,  25,  -2,  -21, -5,  -22, 5,   18,  -4,  8,   -4,  -24,
  20,  -8,  -14, 34,  -39, 16,  -17, 7,   28,  -6,  -2,  -22, -18, -8,  64,
  2,   -37, 40,  -14, -16, 36,  10,  8,   2,   -39, 31,  -30, 30,  -9,  -14,
  26,  -26, -2,  19,  -13, 20,  7,   -36, 22,  -25, -2,  54,  21,  -10, 8,
  -21, 6,   13,  -12, -32, -4,  7,   -14, -48, -3,  16,  -2,  26,  -9,  2,
  -8,  -6,  24,  -5,  6,   -4,  -33, 0,   0,   16,  62,  -4,  -7,  -30, -44,
  -6,  40,  4,   14,  6,   -40, 22,  -15, 28,  -16, -24, 52,  -60, 53,  -7,
  -36, 23,  -14, 2,   19,  -15, 8,   0,   8,   -4,  6,   -6,  -23, 20,  -18,
  7,   -2,  -12, 12,  16,  6,   4,   -8,  -24, 10,  -29, 2,   72,  14,  2,
  -2,  -42, -10, -8,  16,  12,  18,  -1,  -7,  -6,  -15, 0,   9,   6,   17,
  5,   -18, -6,  -48, 20,  20,  30,  16,  -2,  -12, -44, 4,   -16, 40,  -30,
  -6,  14,  -20, 17,  -2,  -5,  9,   -2,  -12, 3,   0,   -6,  18,  -2,  -7,
  22,  -22, 4,   6,   -38, 32,  -34, 22,  61,  18,  -7,  -12, -51, 30,  -33,
  60,  -43, 6,   -12, 0,   13,  14,  -10, 10,  -8,  1,   2,   -4,  4,   -8,
  4,   -2,  -2,  -24, 45,  -34, 25,  -47, 28,  -22, -6,  -1,  1,   2,   9,
  -5,  12,  17,  -8,  4,   -16, 2,   -2,  2,   7,   2,   0,   4,   -12, 6,
  -2,  -2,  12,  -9,  6,   22,  -32, 30,  -18, -7,  35,  -62, 44,  -48, 49,
  -22, -10, 13,  -13, 2,   16,  -8,  7,   5,   -16, 8,   -7,  5,   2,   -4,
  2,   -2,  -2,  13,  -12, 9,   -2,  -19, 26,  -16, 4,   17,  -32, 32,  -20,
  -42, 71,  -61, 16
};

static const int32_t mdt8x4_mode0[1024] = {
  0,   2,   3,   5,   8,   12,  16,  20,  2,   6,   10,  16,  22,  28,  30,
  30,  4,   10,  19,  28,  34,  36,  34,  30,  8,   18,  28,  33,  34,  34,
  30,  28,  -1,  2,   10,  20,  24,  22,  8,   -11, 4,   14,  30,  40,  35,
  13,  -14, -30, 10,  26,  37,  34,  14,  -12, -30, -34, 15,  26,  24,  9,
  -12, -25, -28, -26, 8,   27,  38,  31,  10,  -11, -18, -11, 19,  42,  48,
  26,  -10, -28, -16, 3,   19,  26,  10,  -15, -24, -10, 15,  24,  4,   -8,
  -26, -26, -6,  18,  29,  26,  -2,  1,   4,   12,  26,  37,  36,  27,  0,
  0,   6,   19,  36,  41,  30,  16,  -3,  -13, -18, -10, 0,   6,   4,   2,
  -21, -41, -46, -40, -28, -16, -7,  -2,  14,  30,  29,  9,   -15, -20, -2,
  13,  24,  39,  18,  -17, -24, 5,   23,  6,   11,  -2,  -22, -9,  26,  35,
  -1,  -32, -11, -25, -8,  28,  32,  -4,  -40, -42, 0,   -5,  -11, -16, -29,
  -22, 14,  45,  2,   8,   6,   -14, -23, 2,   38,  41,  21,  42,  30,  -4,
  -17, -6,  4,   4,   32,  36,  2,   -28, -34, -24, -16, -12, 26,  36,  12,
  -38, -50, -24, -8,  -12, 20,  18,  -6,  -5,  20,  19,  -6,  -10, -8,  -18,
  6,   46,  35,  -4,  -12, 14,  -16, -11, 1,   -14, -37, -22, 13,  30,  14,
  34,  32,  10,  9,   34,  43,  27,  20,  16,  -18, -32, -6,  10,  -4,  -6,
  4,   -13, -30, -22, -24, -38, -28, 2,   9,   26,  37,  24,  -4,  -5,  15,
  24,  12,  20,  32,  44,  18,  -29, -32, 8,   -18, -29, -2,  23,  4,   -16,
  13,  38,  -38, -40, -9,  3,   -3,  2,   14,  15,  -6,  20,  31,  4,   -26,
  -29, -18, -8,  -6,  4,   20,  17,  1,   -4,  -20, -45, -7,  -9,  -18, -22,
  12,  41,  9,   -30, 22,  14,  -30, -34, 18,  41,  18,  0,   45,  36,  -6,
  -20, -17, -13, 0,   12,  46,  46,  -10, -34, 8,   30,  0,   -24, 25,  -6,
  -24, 8,   16,  -4,  -4,  11,  -14, -7,  13,  -2,  -24, 2,   30,  7,   13,
  24,  -5,  -26, 10,  34,  -10, -53, -12, -18, -20, -2,  30,  24,  -28, -32,
  32,  32,  -19, -24, 4,   -4,  -4,  33,  38,  12,  -8,  12,  -2,  -12, 24,
  40,  -18, -22, 22,  25,  -21, -35, -18, -9,  -1,  -6,  -10, -24, -33, -34,
  -20, 4,   2,   -1,  8,   48,  60,  22,  5,   12,  28,  2,   -36, -36, -34,
  -26, -8,  -1,  4,   -5,  14,  26,  16,  6,   -3,  -5,  56,  18,  -49, -4,
  38,  -8,  -21, 2,   21,  -12, -5,  16,  -14, 0,   28,  -12, -4,  12,  16,
  -21, -14, 20,  -18, -20, -2,  -7,  -6,  16,  12,  -30, -8,  55,  0,   -18,
  -2,  40,  18,  -36, -26, -2,  32,  8,   -31, -26, 10,  32,  31,  0,   5,
  -3,  18,  18,  -15, -20, -18, -36, -24, 0,   10,  -23, -7,  44,  32,  -16,
  -8,  -22, -36, -12, 16,  -1,  -2,  30,  38,  32,  11,  22,  2,   -34, -18,
  2,   6,   -42, -41, -2,  24,  32,  2,   -26, 14,  30,  17,  -26, -26, 10,
  14,  2,   2,   26,  18,  8,   16,  -10, -10, 47,  0,   -35, -56, 2,   26,
  -36, -33, 6,   46,  31,  -6,  18,  24,  4,   0,   -14, 12,  -16, -22, 2,
  2,   2,   2,   3,   -10, 0,   14,  -3,  -15, -6,  22,  16,  9,   -5,  -14,
  11,  4,   -6,  -8,  -48, 8,   14,  23,  -20, -36, 41,  50,  -10, -56, -6,
  42,  0,   -24, -7,  -2,  0,   -66, 13,  32,  -32, 3,   18,  -22, -8,  15,
  17,  -23, 4,   12,  -12, 21,  16,  -15, -16, 18,  10,  -28, 6,   -1,  -32,
  4,   12,  -12, -12, 26,  -4,  -32, 44,  -6,  -24, -6,  33,  -10, -32, 27,
  14,  58,  2,   -24, 8,   10,  8,   -20, -24, -21, -12, 15,  -2,  -1,  -4,
  0,   54,  13,  16,  -28, -4,  34,  -16, -33, 0,   3,   -2,  -5,  -12, 17,
  -2,  -36, 40,  -22, 40,  6,   -42, 40,  16,  -39, 2,   -60, 27,  14,  -30,
  4,   8,   3,   1,   -3,  4,   -5,  8,   -2,  -4,  4,   -4,  1,   -4,  4,
  6,   -14, 8,   16,  -29, 10,  -11, -9,  7,   8,   -12, -17, 48,  0,   28,
  6,   -41, 32,  20,  -52, 5,   -56, 26,  14,  -28, 12,  5,   -4,  6,   41,
  -26, 9,   10,  -11, 16,  -19, 18,  -18, -7,  24,  -28, 4,   23,  -36, 10,
  41,  -32, 7,   18,  -22, 12,  1,   -1,  -5,  0,   16,  -32, 20,  18,  -50,
  30,  18,  -22, 2,   29,  -34, 6,   32,  -30, 14,  6,   -12, -6,  20,  -14,
  -22, 42,  -22, -3,  20,  -4,  -20, 24,  7,   -40, 46,  -38, 2,   24,  -20,
  -3,  10,  12,  30,  -16, -6,  12,  0,   -14, 28,  -18, -39, 42,  -23, -4,
  27,  -42, 34,  -14, -15, 29,  -38, 22,  4,   -20, 19,  -4,  -12, 12,  2,
  -15, 8,   14,  -33, 22,  22,  -39, 26,  -4,  -20, 31,  -22, 8,   44,  -36,
  20,  0,   -6,  2,   2,   2,   -20, 26,  -24, 5,   18,  -35, 41,  -33, -20,
  26,  -22, 12,  1,   -11, 5,   10,  13,  -32, 35,  -16, -5,  26,  -30, 15,
  18,  -8,  -10, 14,  -4,  -17, 32,  -25, -21, 20,  -4,  -8,  5,   16,  -39,
  34,  29,  -40, 32,  -8,  -20, 34,  -18, -4,  -32, 38,  -30, 8,   8,   -18,
  13,  -5,  22,  -26, 22,  -6,  -12, 22,  -20, 8,   -22, 30,  -20, 0,   16,
  -21, 18,  -7,  8,   -23, 26,  -7,  -23, 44,  -48, 25,  -3,  11,  -23, 35,
  -40, 36,  -30, 15,  -18, 34,  -46, 49,  -44, 34,  -18, 3,   -12, 16,  -14,
  8,   -2,  -4,  6,   -5,  0,   -4,  8,   -13, 11,  -7,  5,   0,   12,  -22,
  32,  -38, 40,  -33, 21,  -8,  0,   2,   -10, 20,  -30, 34,  -31, 20,  -16,
  28,  -36, 38,  -36, 28,  -14, 0,   -2,  5,   -4,  3,   0,   -4,  6,   -4,
  -8,  12,  -19, 22,  -22, 18,  -12, 4,   0,   -4,  6,   -8,  8,   -6,  5,
  -4,  2,   4,   -14, 26,  -33, 34,  -28, 15,  -22, 36,  -47, 50,  -44, 34,
  -16, 1,   15,  -20, 21,  -20, 18,  -12, 8,   -4,  -14, 24,  -29, 28,  -24,
  16,  -9,  5,   15,  -26, 35,  -38, 34,  -25, 14,  -6,  -4,  12,  -24, 34,
  -38, 36,  -28, 12
};

static const int32_t mdt8x4_mode1[1024] = {
  2,   3,   10,  25,  20,  0,   -2,  0,   1,   2,   14,  44,  37,  3,   -2,
  0,   0,   1,   16,  55,  46,  7,   -3,  1,   0,   2,   20,  58,  49,  12,
  -1,  0,   0,   8,   23,  18,  -15, -16, -3,  0,   -2,  13,  42,  28,  -30,
  -30, -4,  -1,  0,   13,  46,  26,  -40, -36, -5,  -2,  2,   14,  37,  12,
  -44, -32, -6,  -2,  6,   12,  -1,  -38, -38, 6,   6,   -4,  5,   17,  1,
  -52, -49, 2,   8,   -4,  0,   7,   11,  -10, -11, 2,   0,   -4,  0,   4,
  33,  56,  52,  14,  -9,  -7,  1,   10,  30,  0,   -5,  16,  7,   3,   7,
  16,  34,  -2,  9,   38,  14,  5,   11,  26,  38,  -12, 6,   55,  20,  10,
  10,  27,  28,  -34, -15, 46,  28,  12,  -1,  16,  32,  30,  -13, -24, -2,
  1,   -2,  23,  32,  16,  -25, -37, 0,   -2,  6,   15,  -11, -18, -1,  -20,
  -2,  -2,  16,  -2,  -57, -28, 56,  32,  8,   -1,  -24, -38, 5,   16,  -6,
  -16, -2,  13,  -23, -54, -6,  13,  -32, -6,  6,   19,  -22, -25, 0,   8,
  -34, 15,  22,  23,  -16, -18, 2,   22,  0,   40,  33,  30,  -3,  2,   14,
  -24, -47, 9,   13,  -12, -18, -10, 31,  8,   -17, 22,  8,   -14, -24, -34,
  22,  38,  28,  22,  -4,  -17, -28, -42, -32, -26, -5,  -11, -19, -24, -11,
  -12, -28, -46, -30, -38, -20, 8,   -6,  -15, -20, -8,  3,   -36, -24, 11,
  -2,  16,  25,  34,  42,  -10, -18, 12,  14,  34,  8,   -36, 1,   18,  6,
  20,  5,   0,   -28, -6,  -14, 12,  28,  6,   6,   8,   -12, 10,  -25, 15,
  48,  7,   23,  18,  -6,  42,  0,   2,   36,  12,  42,  20,  -48, 16,  -8,
  -32, 22,  18,  27,  27,  -5,  12,  -28, -29, 1,   -8,  46,  26,  -36, 20,
  -11, -18, -1,  -8,  24,  -12, -36, 28,  -1,  20,  6,   -11, -18, -22, 17,
  4,   -35, 42,  14,  -19, -12, 13,  56,  -2,  -16, -25, -16, 16,  10,  13,
  10,  -30, 8,   0,   -20, 24,  6,   8,   -24, -8,  35,  18,  -4,  30,  -15,
  -17, -18, 32,  -26, -40, 12,  42,  -18, 29,  -19, -30, 40,  -2,  -10, 3,
  -31, 42,  4,   -26, 20,  -10, -1,  1,   -24, 24,  23,  20,  -16, -18, 16,
  -3,  -12, -43, -24, 16,  -20, 27,  36,  -11, 27,  -12, -10, -24, 14,  12,
  -22, 13,  57,  -6,  10,  8,   4,   14,  -38, 16,  32,  0,   35,  16,  -46,
  12,  -13, 18,  -4,  -26, -33, -2,  18,  2,   -22, 21,  20,  -6,  -19, 18,
  32,  -22, 15,  11,  28,  5,   4,   -24, -14, -24, 38,  8,   10,  -18, 34,
  -8,  31,  -7,  34,  10,  -44, -22, 24,  -33, 24,  -29, 12,  11,  -2,  28,
  28,  -27, -14, 33,  26,  11,  4,   12,  -13, 14,  26,  8,   14,  22,  -18,
  -12, -28, 24,  -23, -50, 10,  32,  -38, 19,  16,  -26, 18,  12,  -12, 25,
  4,   4,   38,  34,  38,  27,  -4,  3,   4,   -10, -18, -62, -34, 4,   -12,
  2,   2,   -24, 2,   54,  11,  -14, -14, 0,   30,  8,   -2,  -17, -11, 20,
  -9,  -6,  10,  -16, 24,  -39, -8,  4,   9,   -4,  18,  -24, 28,  -4,  34,
  -14, 13,  -7,  34,  -46, 0,   -16, 10,  -42, 10,  -9,  50,  -26, 12,  10,
  -8,  11,  38,  -9,  -26, -17, 38,  -12, 4,   -28, -14, -29, 16,  -18, -16,
  -18, 20,  10,  -8,  -36, 18,  10,  4,   22,  -27, 0,   36,  -31, -38, 42,
  -18, -2,  18,  -20, 22,  -23, 57,  40,  12,  14,  -16, -34, 8,   2,   2,
  -19, -30, -12, 32,  4,   4,   -1,  -58, -21, 38,  -10, -20, 9,   2,   -4,
  25,  13,  -18, 8,   5,   -10, 8,   8,   16,  36,  -9,  -40, 43,  -2,  -42,
  -12, -2,  2,   36,  21,  -32, -13, -6,  -6,  -19, -46, -32, 4,   1,   28,
  22,  0,   6,   35,  4,   -2,  3,   -12, 5,   12,  -55, 25,  6,   -2,  3,
  -38, 2,   15,  -22, 19,  -22, 2,   16,  1,   10,  18,  30,  -33, 7,   8,
  -28, 30,  15,  4,   40,  -22, 21,  -18, 20,  -15, -38, -8,  -4,  -18, -1,
  -10, 14,  -24, 26,  18,  12,  1,   28,  -18, 18,  -24, 34,  26,  2,   -18,
  2,   -6,  0,   11,  -9,  11,  -20, 44,  -33, 29,  -30, 32,  -48, -34, -24,
  -45, -30, 28,  -26, -6,  -18, -10, 30,  64,  18,  -16, 14,  24,  -12, 4,
  -38, -44, -4,  6,   -8,  -10, 0,   8,   12,  16,  0,   -3,  5,   -2,  20,
  4,   -4,  -8,  0,   -2,  12,  -10, 21,  -54, -6,  13,  4,   -10, 10,  -14,
  24,  -54, 8,   -6,  3,   5,   -8,  5,   -20, -8,  0,   -8,  -3,  4,   -9,
  18,  -30, 80,  22,  -56, 30,  -25, 14,  3,   32,  16,  8,   20,  -2,  3,
  4,   -38, -13, 0,   -45, 31,  -26, 17,  -10, 32,  23,  -16, 26,  -18, 17,
  -12, 8,   -13, -12, -4,  -47, 6,   22,  -10, 2,   47,  -17, -24, 44,  6,
  -44, 26,  -12, -41, 22,  5,   -26, -8,  38,  -24, 14,  14,  -8,  5,   6,
  0,   -14, 10,  -6,  -4,  4,   -6,  -10, -2,  8,   -12, 16,  -42, -34, -16,
  36,  -19, 4,   8,   -14, 50,  40,  -3,  -34, 37,  -12, 0,   12,  -32, 9,
  17,  22,  -24, 10,  -4,  -5,  12,  -32, -10, 26,  -9,  -4,  20,  -30, 28,
  -44, -32, -25, 0,   0,   -14, 20,  -26, -8,  1,   11,  5,   5,   -2,  6,
  -3,  72,  35,  4,   -6,  -2,  4,   -8,  10,  -42, -8,  32,  -25, 16,  -6,
  -2,  2,   -44, -20, -29, 14,  -8,  -4,  12,  -10, 58,  14,  14,  4,   -9,
  16,  -23, 20,  -56, 28,  -6,  -4,  7,   -10, 14,  -14, 26,  -20, -14, 19,
  -16, 4,   8,   -8,  50,  -72, 14,  -22, 21,  -12, 2,   -10, -30, 18,  -7,
  12,  -10, 8,   -7,  14,  -10, 55,  8,   -6,  6,   -6,  8,   -12, 18,  -28,
  -26, 30,  -26, 23,  -24, 24,  -22, 21,  31,  -40, 38,  -32, 32,  -32, 28,
  0,   -15, 22,  -25, 21,  -18, 18,  -6,  -31, 4,   -8,  9,   -8,  6,   -6,
  2,   12,  8,   -4,  2,   0,   1,   -2,  -2,  -51, -6,  2,   -1,  2,   -2,
  8,   2,   91,  4,   3,   0,   0,   2,   -8,  6,   -69, -2,  0,   0,   -1,
  -1,  4,   -4,  20
};

static const int32_t mdt8x4_mode2[1024] = {
  12,  29,  40,  44,  45,  47,  45,  40,  3,   10,  16,  20,  24,  28,  28,
  27,  2,   2,   4,   6,   8,   7,   7,   7,   0,   2,   2,   2,   1,   0,
  1,   2,   -6,  -20, -30, -34, -32, -22, -8,  2,   8,   14,  20,  26,  34,
  38,  38,  35,  4,   10,  18,  28,  32,  31,  30,  31,  4,   7,   10,  10,
  9,   8,   8,   8,   19,  40,  46,  30,  0,   -28, -52, -59, 10,  28,  38,
  34,  18,  -1,  -12, -12, 0,   1,   0,   -2,  -1,  2,   6,   10,  -1,  -2,
  -4,  -2,  1,   4,   6,   6,   -7,  -15, -22, -22, -12, 2,   11,  13,  13,
  32,  44,  42,  30,  16,  3,   -9,  -7,  -14, -20, -28, -30, -30, -25, -19,
  -2,  -6,  -12, -18, -24, -29, -34, -37, -34, -54, -33, 15,  46,  38,  1,
  -24, -2,  4,   20,  30,  20,  -8,  -32, -32, 4,   10,  10,  2,   -8,  -8,
  3,   14,  6,   10,  10,  10,  14,  22,  28,  28,  16,  21,  7,   -20, -32,
  -11, 27,  49,  20,  34,  30,  6,   -18, -27, -26, -22, -10, -16, -19, -18,
  -8,  2,   8,   8,   8,   18,  26,  32,  35,  31,  24,  18,  16,  20,  0,
  -18, -16, 7,   22,  14,  1,   9,   14,  10,  3,   -12, -31, -40, 20,  44,
  56,  52,  32,  3,   -22, -30, -2,  -8,  -11, -14, -18, -14, -4,  6,   -20,
  -21, 2,   16,  12,  -6,  0,   22,  19,  28,  22,  -7,  -36, -40, -18, 8,
  3,   -1,  -4,  0,   14,  34,  47,  44,  -9,  -22, -34, -34, -26, -17, -14,
  -12, -40, -38, 26,  56,  -11, -61, -15, 48,  -20, -19, 7,   21,  6,   -8,
  -2,  5,   2,   10,  10,  6,   6,   -2,  -16, -26, 6,   11,  14,  14,  8,
  -2,  -8,  -8,  4,   -4,  -1,  -4,  -14, -10, 0,   12,  -6,  2,   13,  7,
  -12, -10, 18,  46,  18,  26,  14,  -14, -36, -37, -20, -1,  -15, -30, -40,
  -30, -4,  26,  46,  46,  8,   -12, -20, 10,  26,  6,   -18, -16, 34,  49,
  20,  -27, -43, -15, 24,  39,  16,  28,  21,  6,   -3,  -9,  -19, -29, 8,
  16,  24,  28,  18,  -3,  -18, -20, -70, -12, 54,  -3,  -44, 17,  36,  -35,
  8,   28,  4,   -34, -8,  25,  12,  -14, 13,  10,  -3,  0,   0,   -10, -6,
  9,   2,   4,   2,   3,   -2,  -4,  3,   6,   2,   -9,  -14, 16,  18,  -18,
  -16, 20,  33,  32,  -18, -30, 15,  44,  13,  -46, 8,   -3,  -16, -13, 14,
  24,  -4,  -34, -31, -42, -26, 2,   18,  12,  10,  17,  16,  4,   -6,  14,
  2,   -22, -10, 25,  28,  12,  -36, -25, 24,  24,  -14, -18, 17,  31,  25,
  -4,  -40, -40, 12,  60,  13,  22,  16,  -4,  -14, -12, -6,  -6,  28,  -26,
  -10, 30,  -9,  -12, 14,  -8,  22,  16,  2,   -12, -9,  6,   6,   2,   -38,
  -44, -12, 31,  25,  -16, -28, 0,   14,  22,  16,  -20, -48, -16, 25,  40,
  44,  -18, -16, 29,  -20, -6,  28,  -18, -26, -22, 30,  4,   -31, 20,  16,
  -25, 34,  36,  -18, -43, 2,   19,  10,  8,   6,   0,   10,  16,  -10, -28,
  -11, 24,  -28, 20,  10,  -38, 29,  9,   -48, 32,  -13, 7,   10,  -12, 2,
  6,   1,   2,   25,  13,  -24, -24, 12,  18,  -2,  -18, 29,  34,  16,  -12,
  -40, -24, 16,  38,  -14, 19,  -10, -8,  24,  -10, -17, 16,  -52, 0,   45,
  -20, -42, 32,  31,  -38, -33, -18, 24,  24,  -12, -22, -2,  27,  -2,  -8,
  -6,  4,   8,   2,   -1,  -6,  11,  -10, 4,   5,   -5,  -1,  7,   -6,  8,
  -2,  -3,  3,   -12, 9,   26,  -24, -13, 6,   22,  -14, -21, 28,  22,  -31,
  46,  46,  -18, -58, 3,   46,  10,  -28, 6,   10,  -24, 16,  0,   -10, 10,
  -4,  -42, 22,  14,  -32, 20,  12,  -36, 20,  29,  6,   -36, 0,   43,  -12,
  -28, 18,  26,  10,  -24, -14, 10,  30,  12,  -38, -40, 55,  -45, 12,  28,
  -54, 54,  -26, -4,  13,  -12, 4,   12,  -20, 12,  2,   -4,  0,   6,   -6,
  -16, 16,  6,   -10, 2,   7,   6,   -2,  -7,  -14, 4,   16,  10,  -8,  -2,
  12,  -20, 15,  -6,  0,   -43, 30,  10,  -40, 32,  8,   -39, 27,  -52, 9,
  36,  -27, -23, 29,  16,  -20, -16, -2,  14,  -2,  -2,  -12, -5,  14,  -13,
  14,  -10, 8,   -10, 10,  -10, 4,   26,  -12, -4,  6,   -4,  6,   -8,  7,
  -36, 6,   15,  -23, 19,  5,   -32, 20,  56,  2,   -52, 9,   42,  -24, -33,
  35,  17,  -17, 8,   -1,  -1,  -1,  2,   -1,  -30, 24,  -6,  -13, 24,  -21,
  14,  -4,  26,  -19, -24, 48,  -32, -18, 42,  -24, 41,  -4,  -30, 14,  19,
  -16, -28, 31,  16,  -22, 22,  -19, 14,  -7,  4,   -1,  -32, 38,  -30, 6,
  24,  -52, 52,  -24, -27, 30,  -4,  -22, 26,  0,   -29, 27,  -8,  0,   4,
  -6,  4,   4,   -9,  1,   8,   -14, 18,  -20, 20,  -19, 14,  -6,  16,  -18,
  16,  -17, 14,  -4,  0,   1,   -30, 21,  4,   -10, 4,   -8,  18,  -12, 44,
  -33, -22, 54,  -34, -10, 50,  -33, -18, 28,  -38, 44,  -48, 44,  -30, 12,
  -14, 24,  -29, 23,  -7,  -16, 24,  -14, -3,  4,   -3,  0,   3,   -8,  14,
  -6,  14,  -13, -2,  22,  -23, -6,  32,  -20, -10, 15,  -16, 14,  -12, 9,
  -7,  3,   25,  -37, 40,  -37, 32,  -27, 21,  -8,  -24, 32,  -22, -1,  28,
  -43, 35,  -14, -24, 18,  2,   -14, 2,   16,  -20, 10,  0,   2,   -6,  10,
  -12, 11,  -7,  3,   12,  -24, 32,  -38, 40,  -38, 27,  -12, 40,  -46, 32,
  -8,  -20, 36,  -38, 20,  10,  -12, 6,   6,   -8,  4,   4,   -6,  -7,  6,
  -4,  2,   -2,  2,   -2,  1,   4,   -2,  0,   2,   -4,  6,   -6,  2,   -17,
  26,  -26, 21,  -20, 19,  -16, 6,   36,  -54, 36,  -2,  -36, 60,  -48, 16,
  1,   1,   -2,  4,   -5,  6,   -5,  2,   8,   -12, 10,  -6,  4,   -3,  2,
  -2,  -24, 43,  -51, 48,  -47, 44,  -32, 13,  -18, 22,  -13, -4,  19,  -28,
  28,  -14, 0,   0,   0,   0,   0,   0,   0,   0,   -4,  4,   -4,  4,   -2,
  3,   -3,  1,   0,   -3,  4,   1,   -9,  12,  -8,  4,   -35, 53,  -58, 58,
  -51, 42,  -28, 10
};

static const int32_t mdt8x4_mode3[1024] = {
  0,   0,   1,   3,   5,   8,   12,  20,  1,   3,   6,   12,  18,  25,  30,
  33,  6,   10,  18,  26,  32,  36,  36,  32,  12,  21,  30,  34,  34,  34,
  32,  26,  2,   2,   4,   9,   14,  16,  8,   -4,  6,   10,  18,  29,  30,
  13,  -8,  -21, 16,  29,  39,  36,  14,  -13, -26, -28, 34,  42,  34,  8,
  -16, -31, -32, -27, 4,   10,  18,  19,  10,  -4,  -14, -10, 17,  26,  34,
  21,  -10, -28, -18, 6,   32,  38,  20,  -18, -36, -19, 13,  30,  33,  14,
  -20, -32, -14, 16,  34,  33,  4,   15,  21,  13,  -8,  -14, 6,   22,  26,
  37,  22,  -11, -22, 8,   33,  17,  34,  21,  -16, -29, 5,   35,  12,  -29,
  15,  -13, -26, 2,   26,  2,   -37, -47, 13,  28,  24,  12,  14,  24,  9,
  -16, 42,  40,  12,  4,   25,  18,  -15, -23, 25,  -14, -23, 14,  20,  -11,
  -20, 4,   -38, -50, 0,   26,  0,   -12, 11,  32,  8,   16,  12,  -5,  -34,
  -43, -37, -22, 18,  13,  -14, -40, -40, -26, -25, -13, 12,  -4,  -10, 8,
  16,  -3,  -6,  5,   17,  28,  46,  40,  10,  -3,  3,   6,   -7,  -4,  6,
  -16, -38, -6,  33,  34,  -6,  10,  -12, -41, -1,  41,  27,  7,   18,  10,
  -18, 0,   12,  -14, -19, 8,   30,  9,   -8,  -20, -44, -36, 12,  40,  38,
  44,  3,   -18, 1,   -1,  -7,  20,  53,  4,   -32, 4,   12,  -10, 16,  39,
  -8,  -30, 8,   21,  -18, -12, 25,  10,  -16, 16,  16,  -30, -36, -2,  -2,
  -29, -16, -14, 21,  45,  8,   -36, -12, 31,  -13, 10,  40,  18,  -26, -12,
  27,  21,  -26, -8,  14,  3,   -6,  4,   -6,  0,   -48, 0,   30,  4,   -25,
  -35, -10, 22,  46,  38,  5,   8,   2,   -6,  18,  6,   22,  -20, 2,   10,
  -16, 12,  12,  -34, -46, -8,  16,  -26, 0,   24,  -32, -25, 8,   32,  -16,
  -13, 29,  5,   -2,  44,  -28, 4,   50,  13,  -22, 15,  42,  18,  -14, 26,
  11,  -22, 0,   8,   -16, -24, -22, -16, -3,  4,   -20, -20, -2,  -10, -18,
  26,  20,  -15, 4,   52,  24,  -34, -20, -12, -30, -16, 32,  16,  11,  53,
  18,  2,   -24, 2,   -10, -33, 10,  1,   37,  -6,  -8,  -10, -41, -18, -22,
  -40, 0,   3,   28,  21,  18,  16,  0,   29,  25,  11,  24,  32,  36,  38,
  2,   13,  -20, -11, 4,   -10, 0,   -8,  -10, 30,  -29, -12, -48, -28, -3,
  -24, 0,   20,  44,  10,  4,   39,  -2,  -24, 0,   -14, 70,  -22, -40, 25,
  2,   -23, 22,  20,  -2,  -21, 18,  -6,  -19, 13,  2,   -24, 21,  23,  -4,
  2,   4,   -18, -12, 12,  -14, -18, 16,  6,   -16, 20,  33,  -36, 2,   20,
  -5,  -40, -34, 10,  26,  15,  2,   4,   15,  -1,  -15, -14, -9,  28,  -28,
  36,  45,  0,   -10, -40, -18, 26,  -16, -21, -18, 38,  30,  -17, -10, -8,
  -6,  -22, -21, 2,   6,   36,  36,  -50, 27,  2,   2,   -14, -30, 23,  6,
  2,   14,  -4,  8,   -42, -22, 14,  12,  34,  -30, 32,  32,  -6,  3,   -23,
  -20, -2,  -52, 18,  0,   33,  10,  -40, 16,  12,  28,  -33, -28, 30,  -7,
  19,  -4,  -8,  22,  -26, 6,   -3,  8,   -17, -26, 42,  10,  5,   -21, 3,
  23,  -14, 12,  -26, 24,  -4,  14,  20,  -30, -19, 3,   -46, -22, -9,  -2,
  16,  13,  22,  39,  28,  18,  -22, -9,  18,  -42, -42, -14, -8,  14,  -12,
  14,  -2,  28,  23,  -31, 18,  2,   -46, -25, 1,   -12, -4,  -30, 8,   36,
  20,  26,  -4,  30,  14,  -22, 44,  -14, -8,  -20, -16, 26,  -20, -42, -4,
  -14, 38,  -15, -16, 20,  15,  3,   -2,  10,  -7,  -26, -34, -22, -15, 26,
  21,  -10, 34,  38,  44,  5,   -20, -14, -30, -3,  -48, -30, 4,   -7,  16,
  11,  36,  27,  0,   11,  -6,  6,   -10, -24, 1,   -29, 20,  -28, -32, 16,
  -20, -22, -26, 11,  25,  19,  15,  2,   35,  44,  -14, -37, 6,   -10, -26,
  -17, -17, -3,  -14, 17,  -6,  12,  30,  -26, 10,  36,  -18, -13, -40, -12,
  30,  -19, 12,  29,  -14, 58,  -11, 12,  -4,  -26, -18, 4,   0,   -30, -18,
  6,   36,  8,   -14, 35,  -30, 34,  -16, -23, 18,  -16, 4,   3,   9,   -5,
  2,   8,   12,  -44, -19, 2,   17,  20,  -38, -1,  19,  56,  7,   -22, -14,
  0,   31,  -20, -44, -18, -4,  45,  -13, -18, 8,   11,  28,  -12, -4,  -14,
  12,  1,   -22, -5,  16,  30,  -12, -26, 24,  14,  26,  -21, -39, 16,  20,
  12,  -44, -30, 22,  6,   19,  -25, -16, 16,  44,  5,   -4,  -9,  -2,  14,
  14,  -49, 9,   -22, 45,  -36, 14,  20,  -18, 39,  -18, -6,  -1,  4,   -2,
  -8,  -16, -12, 22,  -12, 34,  -36, 10,  33,  -10, -4,  3,   -8,  4,   8,
  -14, -23, 42,  -44, 18,  14,  -19, 6,   0,   7,   -18, 29,  -22, -10, 34,
  -38, 20,  14,  -42, 38,  -14, -5,  25,  -28, 9,   13,  -19, 14,  -5,  -26,
  40,  -28, 6,   20,  -30, 25,  -6,  -2,  28,  -17, -6,  4,   18,  -26, 12,
  -19, -16, 38,  -8,  -24, 20,  10,  -20, 32,  -26, -1,  12,  18,  -48, 44,
  -10, -26, 42,  -36, 11,  6,   -2,  -12, 8,   -11, -12, 34,  -24, -13, 33,
  -22, 1,   26,  -48, 24,  10,  -6,  -33, 52,  -25, 2,   21,  -32, 9,   16,
  0,   -30, 32,  -4,  2,   10,  -11, -8,  18,  -10, -8,  -14, 37,  -55, 58,
  -50, 40,  -22, 4,   -10, 14,  -2,  -14, 20,  -24, 22,  -10, -6,  3,   -2,
  6,   -10, 12,  -10, 5,   3,   -5,  9,   -14, 15,  -18, 18,  -8,  -9,  12,
  -1,  -16, 30,  -29, 18,  -9,  12,  -30, 48,  -50, 32,  -12, 0,   2,   -4,
  2,   -10, 16,  -10, -6,  16,  -12, 6,   -12, 24,  -36, 45,  -38, 20,  -3,
  2,   4,   -4,  4,   8,   -17, 19,  -14, -5,  -8,  22,  -42, 43,  -33, 16,
  2,   18,  -29, 25,  -2,  -21, 30,  -27, 14,  -6,  22,  -38, 46,  -36, 18,
  -6,  -3,  4,   -6,  4,   6,   3,   -2,  5,   0,   -5,  10,  -7,  -10, 22,
  -30, 26,  -12, 4,   -27, 47,  -60, 60,  -40, 12,  1,   15,  -23, 24,  -16,
  0,   12,  -10, 4
};

static const int32_t mdt8x4_mode4[1024] = {
  7,   12,  10,  10,  12,  10,  10,  9,   5,   12,  20,  22,  26,  26,  22,
  16,  4,   11,  23,  30,  33,  35,  33,  26,  4,   13,  24,  32,  36,  36,
  34,  32,  10,  16,  14,  2,   -10, -12, -10, -12, 10,  26,  30,  19,  -4,
  -24, -30, -26, 8,   24,  38,  35,  10,  -20, -35, -34, 8,   22,  32,  36,
  20,  -10, -28, -32, 12,  7,   -14, -30, -24, -1,  18,  26,  14,  22,  -2,
  -38, -48, -16, 26,  44,  6,   23,  22,  -8,  -30, -26, 6,   37,  3,   13,
  22,  23,  4,   -17, -9,  20,  -22, -36, -26, 4,   23,  30,  22,  0,   -14,
  -36, -38, -12, 22,  37,  20,  -7,  6,   9,   8,   -4,  -4,  4,   -3,  -14,
  14,  38,  48,  26,  -6,  -28, -24, -19, 14,  28,  22,  6,   13,  22,  18,
  4,   8,   26,  26,  20,  20,  34,  34,  22,  -5,  -4,  9,   11,  8,   3,
  8,   20,  -8,  -22, -24, -16, -23, -50, -53, -30, 14,  4,   0,   19,  24,
  1,   -28, -28, 22,  28,  8,   1,   20,  10,  -22, -25, 22,  38,  21,  -27,
  -34, 3,   20,  12,  12,  19,  14,  -18, -51, -24, 24,  34,  -24, -12, 32,
  28,  -16, -25, 10,  37,  -9,  -16, 10,  35,  6,   -28, 4,   42,  28,  24,
  -10, -12, 9,   4,   -5,  8,   28,  46,  6,   -38, -21, 12,  -2,  -19, 16,
  13,  -10, -2,  0,   -7,  11,  14,  30,  35,  -10, -34, 0,   23,  11,  0,
  18,  28,  -2,  -42, -6,  44,  0,   -39, 0,   -8,  -4,  -8,  12,  42,  2,
  -54, -12, -36, 2,   50,  22,  -41, -34, 16,  13,  -2,  -20, 8,   16,  -15,
  -8,  21,  -5,  10,  14,  -12, -26, -1,  24,  18,  -21, -38, -10, 42,  28,
  -14, -17, -18, -4,  -9,  -16, 0,   44,  38,  -17, -36, -8,  -4,  17,  4,
  -13, -4,  14,  2,   26,  12,  0,   6,   -26, -40, 4,   26,  31,  12,  -33,
  -18, 40,  41,  -12, -24, -42, 6,   56,  11,  -26, -1,  6,   -22, -7,  0,
  16,  -17, -22, 21,  8,   -36, 31,  14,  -38, -30, 2,   9,   14,  4,   9,
  2,   -10, 25,  35,  -22, -19, 22,  -14, -12, 28,  28,  7,   45,  55,  -11,
  28,  12,  -12, 6,   14,  -17, -8,  8,   1,   16,  -6,  -16, 2,   -34, -46,
  10,  -39, -29, 16,  4,   -5,  18,  24,  4,   -3,  -25, -20, -30, -22, -9,
  -20, -26, 52,  2,   -41, 4,   10,  -6,  2,   -4,  34,  28,  -14, 23,  58,
  6,   -4,  32,  -10, -5,  -6,  -19, 1,   -4,  -24, 4,   42,  43,  20,  10,
  -9,  -4,  -18, -31, 2,   -8,  -29, 4,   16,  -12, -1,  2,   -22, -32, -34,
  -33, 0,   -6,  4,   43,  4,   24,  42,  16,  0,   21,  -18, -24, 30,  15,
  6,   22,  42,  -3,  -6,  45,  36,  13,  -22, -14, 5,   12,  -8,  9,   20,
  -22, -42, 16,  10,  -28, -22, -27, 22,  25,  -18, 6,   20,  -18, -2,  35,
  -44, 28,  15,  -30, 20,  6,   -38, 6,   -1,  0,   9,   -18, 0,   10,  -11,
  28,  40,  -10, -29, 28,  0,   -14, 13,  -1,  -21, -14, 25,  23,  -33, -1,
  34,  -37, 8,   10,  7,   -4,  24,  12,  -20, 10,  28,  -28, 4,   42,  -41,
  -16, 44,  -18, -6,  16,  -14, -2,  -11, 0,   28,  -38, -50, 2,   32,  -22,
  4,   6,   -18, 15,  -26, -4,  25,  28,  -3,  -27, 0,   17,  6,   19,  -15,
  -44, -6,  30,  8,   -38, -31, -8,  18,  42,  -4,  -30, 13,  22,  -16, 16,
  17,  -45, -2,  26,  -8,  -10, 22,  -33, -20, 38,  16,  -22, -22, -20, -27,
  18,  36,  -18, -36, 12,  40,  8,   -6,  8,   -24, -9,  46,  -6,  -34, 4,
  0,   -12, 21,  8,   -22, -2,  12,  -2,  20,  -25, 27,  19,  -34, 4,   8,
  -38, 35,  -3,  -22, 7,   -17, -6,  40,  5,   2,   -26, 8,   30,  -15, -6,
  26,  -28, 29,  7,   -20, 18,  -19, -12, 42,  -26, -18, 2,   34,  -18, -16,
  10,  -56, -18, 6,   -8,  -13, -5,  18,  33,  15,  49,  -42, 19,  21,  -12,
  -6,  -8,  -39, -29, 14,  -4,  -1,  -9,  10,  11,  -6,  27,  20,  10,  -25,
  6,   -34, -48, 18,  -14, 10,  -38, 26,  16,  24,  52,  6,   8,   40,  -5,
  -8,  9,   -39, -26, -22, -1,  -22, -9,  10,  -6,  10,  10,  2,   8,   36,
  27,  22,  -4,  6,   -4,  -2,  25,  -24, -48, -30, 3,   -20, 22,  -3,  -23,
  -1,  57,  20,  -5,  26,  -25, -4,  17,  2,   -12, -28, 11,  -5,  -10, 32,
  -21, -12, -17, -13, -27, -21, 0,   -10, 42,  8,   28,  8,   36,  28,  8,
  26,  -39, -16, 4,   -22, -22, 1,   -48, 13,  0,   40,  -26, 6,   24,  -21,
  23,  -2,  0,   -11, 24,  10,  6,   12,  -12, -7,  4,   -26, 6,   -36, 2,
  0,   -20, 46,  -20, 48,  -26, 38,  4,   -9,  17,  -36, 2,   -2,  -11, -16,
  20,  -33, 32,  -24, 26,  39,  -28, 16,  -5,  -26, 18,  -12, 0,   -62, 40,
  -22, -2,  24,  0,   -3,  13,  32,  4,   -2,  -2,  6,   -30, 33,  -28, -42,
  12,  0,   -12, 12,  1,   -6,  5,   -35, 37,  -30, -6,  8,   -32, 10,  -22,
  -11, 24,  -12, 6,   32,  -23, 44,  -4,  -24, 20,  -12, -6,  2,   -16, -7,
  -6,  -26, 39,  -26, 2,   21,  -28, 33,  -8,  0,   29,  -4,  12,  12,  -20,
  32,  -29, -18, -8,  -14, -22, 14,  -24, 0,   19,  -6,  39,  -22, 30,  2,
  -12, 34,  -30, 41,  -47, 21,  -8,  -10, 12,  -24, 20,  8,   16,  -18, 36,
  -44, 48,  -36, 28,  -2,  -18, 14,  -32, 32,  -32, 25,  -20, 7,   16,  -14,
  25,  -18, 20,  -17, 10,  5,   -16, 10,  -14, 16,  -18, 11,  -5,  4,   -4,
  -2,  8,   -7,  8,   1,   -1,  20,  -32, 38,  -40, 24,  -12, -2,  4,   -13,
  14,  -2,  -2,  16,  -14, 20,  -10, -30, 36,  -44, 41,  -42, 34,  -30, 10,
  28,  -38, 37,  -42, 22,  -17, 10,  1,   -12, 7,   4,   0,   14,  -6,  9,
  -12, -18, 30,  -43, 40,  -46, 36,  -29, 18,  -6,  8,   -6,  12,  -8,  6,
  -2,  -2,  16,  -19, 34,  -36, 29,  -22, 6,   0,   14,  -26, 30,  -38, 40,
  -32, 26,  -10, 16,  -24, 30,  -28, 20,  -14, 5,   -2,  9,   -15, 20,  -22,
  22,  -18, 14,  -4
};

static const int32_t mdt8x4_mode5[1024] = {
  8,   14,  13,  16,  18,  12,  7,   8,   13,  18,  24,  30,  28,  17,  14,
  12,  16,  23,  32,  40,  30,  20,  19,  16,  18,  27,  36,  42,  30,  22,
  22,  18,  13,  14,  14,  6,   -14, -21, -14, -2,  18,  27,  30,  10,  -24,
  -37, -28, -5,  17,  32,  35,  8,   -24, -37, -33, -12, 14,  28,  27,  5,
  -18, -30, -31, -23, 12,  4,   -8,  -11, -8,  1,   8,   21,  23,  13,  -10,
  -28, -20, 1,   21,  34,  27,  28,  -4,  -35, -32, -2,  34,  38,  20,  32,
  4,   -26, -31, -6,  33,  36,  16,  2,   -8,  2,   22,  6,   -20, -16, 40,
  14,  -22, -6,  35,  17,  -29, -28, 46,  22,  -32, -22, 24,  24,  -16, -32,
  25,  24,  -20, -24, 0,   15,  2,   -25, -21, -37, -6,  36,  30,  -5,  -12,
  6,   -12, -46, -22, 45,  34,  -24, -12, 22,  13,  -14, -14, 14,  4,   -28,
  -5,  26,  26,  23,  6,   -18, -23, -19, -9,  12,  22,  -6,  -40, -22, 16,
  22,  24,  -2,  26,  0,   -44, -26, 14,  17,  27,  2,   6,   0,   -6,  9,
  6,   -18, -10, 8,   -12, -2,  32,  38,  3,   -44, -50, 2,   -38, -12, 8,
  -2,  9,   27,  7,   -34, -43, -10, 14,  -10, 2,   41,  17,  -46, -7,  11,
  20,  -11, -21, 18,  14,  -24, 33,  26,  20,  0,   -34, -27, -4,  3,   -14,
  -6,  4,   7,   -20, -10, 42,  24,  -15, -13, 1,   4,   -20, -6,  48,  26,
  14,  6,   -8,  -12, 10,  15,  2,   -10, 38,  24,  -12, -12, 34,  18,  -43,
  -54, 12,  18,  48,  30,  2,   14,  23,  -10, 28,  18,  30,  32,  4,   16,
  30,  -10, 20,  -8,  -22, 4,   1,   -8,  14,  6,   -5,  -31, -44, -12, -10,
  -44, -26, 20,  14,  2,   2,   34,  26,  -5,  12,  14,  4,   12,  0,   18,
  29,  8,   15,  14,  -34, 18,  16,  -28, -8,  24,  5,   -4,  -62, 4,   34,
  -35, -36, 12,  -12, -35, -15, 39,  3,   -17, 32,  12,  -11, 30,  -36, 38,
  10,  -22, 38,  10,  -17, 40,  -6,  -7,  6,   -9,  0,   -4,  -13, 16,  44,
  -40, -11, 7,   -21, -6,  -12, -20, 5,   24,  -16, 6,   -14, -20, 31,  -32,
  -24, 30,  -18, 6,   10,  -21, 10,  -24, -21, 10,  6,   -12, 34,  -1,  -34,
  22,  20,  -3,  12,  -40, 4,   22,  -24, 56,  -60, 4,   40,  4,   -35, -26,
  4,   8,   -2,  8,   -10, -19, 4,   0,   -13, 10,  34,  1,   -36, -14, 35,
  20,  -13, 7,   -31, -2,  42,  23,  -16, -16, 0,   8,   -44, 10,  -28, 8,
  14,  2,   2,   -29, -2,  28,  -25, 19,  -2,  -36, 23,  -18, 42,  15,  1,
  7,   -30, -22, 38,  -4,  -6,  -46, 14,  2,   5,   24,  12,  -24, -32, -28,
  12,  -3,  28,  45,  14,  -19, 8,   -10, 32,  -22, -3,  9,   -16, 10,  24,
  16,  18,  -20, -18, -14, -42, 40,  -32, 3,   -12, -10, 33,  30,  -19, 8,
  5,   36,  24,  -54, -22, 38,  13,  -20, 10,  -16, -2,  14,  6,   1,   8,
  0,   3,   -28, -16, 38,  9,   -24, -4,  19,  -5,  20,  20,  -32, -35, 28,
  10,  -33, -2,  31,  -10, -2,  30,  -38, 18,  8,   23,  -30, 16,  -10, 1,
  -8,  8,   -11, 38,  -66, 27,  -4,  -28, 34,  -16, -12, 2,   1,   6,   10,
  -21, 24,  -15, 20,  8,   44,  26,  26,  27,  -1,  -47, -30, -10, 2,   -12,
  -17, -18, -6,  2,   -5,  -20, -26, -30, -22, -13, -4,  30,  30,  0,   35,
  18,  10,  37,  2,   -24, -8,  -27, 10,  -18, -50, 8,   -36, -26, 2,   -8,
  -2,  20,  -6,  27,  -10, 4,   -5,  6,   24,  15,  27,  16,  14,  39,  12,
  -35, 28,  -38, -22, 8,   -20, -36, 8,   17,  -26, 2,   6,   -14, -31, 15,
  -62, 14,  -6,  8,   -14, 16,  -13, -2,  6,   -13, 8,   8,   -3,  3,   27,
  6,   56,  15,  -10, -24, 40,  -32, 2,   6,   -38, -12, 25,  -45, 26,  -32,
  9,   -10, -14, 3,   0,   -8,  18,  -24, 42,  -25, 14,  22,  -27, 41,  -1,
  18,  18,  0,   30,  -3,  -6,  2,   -32, 18,  -38, 10,  -24, -24, 12,  44,
  8,   -29, -22, -7,  6,   32,  -16, -58, -10, 36,  32,  4,   -4,  -22, 12,
  42,  10,  -36, -20, -4,  -1,  12,  -6,  -16, -6,  18,  11,  -5,  3,   13,
  -32, 10,  -10, -22, 16,  -60, 2,   21,  -16, 12,  2,   -10, 3,   13,  2,
  8,   1,   19,  -16, 24,  12,  24,  2,   22,  -46, 32,  -14, -18, 30,  -49,
  14,  6,   17,  6,   -32, -8,  21,  10,  -2,  -6,  -15, -24, 56,  -8,  -12,
  -38, 12,  -4,  29,  -18, -5,  -47, 63,  -4,  6,   3,   -12, 3,   14,  10,
  -8,  -23, 15,  12,  33,  8,   -4,  -14, 32,  14,  -8,  -7,  -46, 1,   -4,
  32,  -48, -4,  2,   10,  5,   37,  -58, 30,  -16, 20,  -22, -7,  -2,  -6,
  15,  10,  -20, 16,  1,   -8,  28,  17,  6,   48,  -1,  -14, -11, 5,   -37,
  -26, -14, -54, -9,  26,  14,  -4,  43,  13,  27,  34,  18,  -30, -5,  1,
  -18, -12, -7,  -19, -10, 16,  -1,  45,  20,  -8,  18,  -27, -11, -23, 4,
  -62, -28, 0,   -2,  14,  30,  20,  -6,  50,  28,  -11, 8,   -18, -14, -20,
  10,  -24, -4,  -10, 17,  -11, 20,  -5,  2,   22,  -8,  18,  -38, 30,  -52,
  18,  -4,  -5,  -27, 20,  8,   4,   25,  -7,  -13, 8,   12,  -10, -16, -3,
  -18, 6,   14,  14,  -34, 44,  -28, 39,  -24, 23,  -14, -27, 12,  -26, -27,
  -4,  -14, -36, -18, 24,  2,   20,  50,  5,   21,  49,  20,  -19, 0,   -12,
  -45, -2,  -16, -40, -6,  0,   10,  -8,  26,  0,   0,   16,  2,   20,  -26,
  22,  -10, -2,  -2,  -14, -55, -20, 23,  -10, -12, 17,  -11, 20,  65,  20,
  -22, 12,  15,  -15, 18,  -11, -42, -6,  4,   9,   -23, 18,  -18, 9,   13,
  12,  -25, 24,  -18, 3,   14,  -26, 36,  -14, 26,  -24, 8,   6,   -32, 38,
  -48, 14,  -21, 23,  -8,  -2,  29,  -32, 38,  -4,  4,   -4,  -4,  12,  -24,
  24,  -18, 12,  -18, 26,  -26, 26,  -17, 15,  -4,  -24, 26,  -40, 36,  -36,
  28,  -22, 7,   19,  -16, 32,  -29, 28,  -26, 20,  -3,  -14, 16,  -22, 23,
  -20, 20,  -13, 2
};

static const int32_t mdt8x4_mode6[1024] = {
  4,   8,   8,   10,  13,  14,  15,  15,  4,   10,  17,  24,  28,  30,  28,
  24,  4,   12,  22,  30,  35,  36,  34,  30,  6,   15,  22,  27,  29,  30,
  31,  32,  -13, -34, -46, -35, -16, 9,   32,  40,  -14, -31, -37, -26, -12,
  0,   10,  22,  -8,  -5,  10,  16,  8,   -10, -18, -10, 8,   26,  40,  32,
  10,  -9,  -10, -8,  6,   5,   5,   22,  37,  40,  29,  10,  -6,  -11, 3,
  32,  46,  37,  18,  4,   -4,  0,   8,   2,   -9,  -16, -12, -3,  8,   15,
  4,   -20, -44, -49, -32, -16, -6,  -6,  4,   5,   0,   -1,  8,   20,  -6,
  -16, -28, -28, -4,  20,  38,  42,  -12, -34, -50, -40, -8,  22,  36,  33,
  -14, -24, -26, -18, -9,  -2,  0,   9,   23,  30,  10,  -18, -48, -40, -2,
  24,  -8,  -11, -2,  15,  26,  18,  -12, -35, -18, -32, -22, 11,  44,  37,
  0,   -26, -3,  1,   6,   0,   -16, -26, -10, 12,  4,   24,  40,  21,  -6,
  -18, -12, 7,   9,   16,  4,   -17, -12, 18,  32,  19,  15,  12,  -6,  -5,
  4,   6,   -4,  -14, -2,  -2,  16,  38,  34,  -2,  -52, -67, 7,   2,   -15,
  -31, -23, 8,   36,  36,  24,  41,  32,  7,   -14, -10, 14,  35,  4,   10,
  19,  26,  18,  0,   -15, -16, -16, -34, -44, -34, -10, 4,   -4,  -16, 28,
  36,  11,  -20, -34, -22, 1,   21,  2,   12,  12,  -4,  -20, -12, 6,   18,
  22,  33,  14,  -20, -36, -20, 16,  43,  18,  25,  22,  5,   -25, -38, -2,
  32,  -26, -42, -30, -16, -14, -27, -43, -37, -6,  -4,  0,   3,   7,   10,
  12,  6,   16,  24,  26,  21,  19,  30,  35,  27,  10,  6,   -10, -22, -22,
  -22, -28, -24, -32, -20, 17,  20,  -10, -17, 16,  36,  6,   0,   -22, -24,
  8,   36,  12,  -36, 42,  50,  12,  -22, -12, 15,  -2,  -40, 10,  2,   -14,
  -18, -8,  11,  21,  16,  -2,  0,   3,   4,   0,   -4,  12,  28,  -38, -34,
  26,  45,  -5,  -42, -16, 19,  2,   6,   -8,  -30, -9,  29,  22,  -18, 34,
  34,  -8,  -22, 8,   28,  0,   -36, 7,   -7,  -6,  26,  36,  10,  -8,  -2,
  22,  36,  12,  -32, -46, -22, 7,   10,  -4,  -10, -18, 0,   33,  38,  -2,
  -30, 25,  39,  20,  -11, -32, -21, 3,   18,  23,  9,   -35, -31, 20,  38,
  16,  -12, 14,  5,   -4,  4,   9,   -11, -20, -18, 22,  28,  -6,  -39, -8,
  42,  38,  -22, -20, -28, -2,  34,  18,  -26, -22, 6,   -4,  -30, -10, 51,
  24,  -32, -6,  54,  -13, -4,  22,  12,  -20, -19, -6,  -20, -29, -2,  28,
  8,   -8,  2,   10,  13,  -22, -28, -12, 22,  15,  -32, -24, 24,  -7,  -17,
  -12, 6,   4,   -23, -14, 34,  60,  43,  -24, 10,  50,  -11, -40, 14,  -8,
  -16, -8,  -8,  -24, -5,  21,  5,   -5,  12,  24,  1,   -14, 12,  10,  -28,
  67,  24,  -48, -4,  28,  -20, -32, 12,  2,   -10, -13, -13, -6,  28,  30,
  -15, -26, 2,   29,  -2,  -20, -2,  5,   -14, 8,   12,  -16, -20, 6,   26,
  12,  -16, 10,  15,  2,   10,  19,  -19, -40, 0,   -12, -29, -28, 14,  20,
  -25, 0,   66,  27,  24,  6,   4,   16,  0,   -24, -36, -28, -25, 7,   8,
  -18, -12, 22,  17,  -6,  -32, -37, -12, -6,  -19, -18, -6,  -18, 25,  60,
  28,  7,   31,  32,  3,   11,  -8,  -38, -34, -15, -14, -25, -18, -8,  -4,
  23,  21,  -4,  3,   17,  8,   -2,  3,   11,  9,   -14, 6,   20,  -14, -18,
  -6,  9,   -4,  -23, -6,  16,  -14, -14, -5,  23,  13,  -22, 10,  42,  -18,
  -54, -16, 48,  0,   -48, 8,   36,  -34, 25,  4,   -24, 15,  22,  -3,  8,
  26,  -14, -6,  2,   -8,  -12, 1,   -22, -28, 57,  10,  -36, 10,  42,  -12,
  -10, 52,  -10, -14, 10,  -2,  -20, 11,  14,  -36, -44, 32,  10,  -47, 38,
  18,  -44, 42,  -31, 14,  10,  -12, -2,  2,   0,   -12, 18,  -20, -10, 34,
  -16, -15, 30,  -16, 4,   -5,  5,   -5,  -4,  6,   -15, 10,  8,   -4,  7,
  4,   -8,  16,  -11, 6,   -51, 23,  23,  -52, 20,  31,  -55, 27,  -33, 15,
  18,  -16, 6,   10,  -6,  4,   22,  -16, -11, 18,  -13, -7,  22,  -18, 44,
  -26, -8,  30,  -16, -10, 23,  -18, -30, 16,  2,   -20, 19,  0,   -12, 18,
  44,  -28, -10, 40,  -24, -18, 36,  -30, 7,   1,   0,   -12, 14,  9,   -26,
  22,  -12, 14,  -10, 4,   10,  -24, 24,  -14, -4,  12,  -18, 13,  1,   -18,
  24,  -7,  0,   -8,  -11, 21,  -4,  -14, 20,  -12, 64,  -28, -31, 44,  -10,
  -31, 46,  -24, 6,   -6,  1,   0,   -2,  -2,  4,   -1,  -22, 24,  -10, -11,
  29,  -36, 28,  -14, -48, 60,  -34, -6,  37,  -44, 27,  -8,  -8,  6,   6,
  -8,  -3,  16,  -18, 8,   -22, 32,  -20, -2,  24,  -36, 35,  -18, -48, 50,
  -29, 0,   15,  -17, 8,   -4,  2,   -8,  16,  -10, -15, 36,  -37, 20,  -16,
  6,   10,  -14, 6,   8,   -14, 4,   26,  -27, 21,  -10, -5,  16,  -13, 8,
  0,   3,   -14, 10,  3,   -18, 18,  -12, -3,  0,   4,   2,   -17, 28,  -26,
  12,  48,  -54, 26,  12,  -40, 45,  -32, 14,  -32, 40,  -32, 12,  14,  -35,
  30,  -17, 24,  -28, 22,  -7,  -12, 28,  -28, 19,  -12, 10,  1,   -7,  12,
  -18, 16,  -10, 20,  -26, 19,  2,   -24, 34,  -35, 18,  22,  -32, 40,  -44,
  46,  -40, 25,  -9,  2,   -4,  -4,  12,  -22, 28,  -24, 10,  -20, 32,  -34,
  32,  -22, 13,  -4,  0,   -8,  4,   2,   -6,  6,   -8,  6,   -2,  -8,  16,
  -24, 31,  -33, 30,  -20, 4,   -16, 30,  -44, 51,  -46, 35,  -22, 10,  -16,
  25,  -26, 20,  -12, 4,   4,   -4,  4,   -8,  8,   -10, 10,  -2,  -2,  2,
  -8,  14,  -16, 16,  -14, 8,   -4,  0,   7,   -14, 14,  -14, 12,  -8,  3,
  -1,  -6,  20,  -32, 39,  -36, 27,  -17, 6,   -26, 39,  -49, 48,  -38, 24,
  -12, 4,   10,  -18, 18,  -16, 10,  -7,  4,   -2,  -15, 24,  -28, 30,  -27,
  18,  -10, 4,   12,  -24, 30,  -32, 32,  -27, 18,  -8,  -18, 28,  -37, 42,
  -38, 27,  -16, 7
};

static const int32_t mdt8x4_mode7[1024] = {
  0,   2,   3,   7,   12,  18,  25,  30,  1,   4,   8,   14,  22,  29,  33,
  34,  2,   7,   15,  22,  29,  34,  35,  33,  6,   14,  24,  28,  32,  33,
  31,  28,  2,   8,   18,  29,  37,  36,  26,  12,  4,   18,  30,  36,  30,
  18,  -2,  -18, 10,  24,  31,  22,  4,   -14, -27, -28, 14,  22,  14,  -3,
  -20, -30, -30, -26, 6,   22,  40,  42,  30,  6,   -18, -26, 10,  28,  34,
  20,  -8,  -28, -26, -7,  10,  14,  0,   -20, -24, -10, 14,  31,  1,   -9,
  -22, -19, 0,   23,  36,  35,  8,   30,  35,  15,  -6,  4,   36,  50,  12,
  26,  10,  -19, -18, 14,  34,  19,  6,   -7,  -34, -36, -4,  17,  1,   -17,
  -18, -36, -36, -11, 6,   -4,  -20, -20, 8,   32,  35,  15,  -13, -38, -42,
  -28, 18,  26,  8,   -12, -19, -10, -2,  -4,  8,   6,   4,   12,  27,  28,
  8,   -16, 8,   19,  30,  39,  32,  4,   -24, -37, -8,  -27, -22, -1,  -10,
  -32, -23, 16,  -10, -2,  25,  18,  -16, -12, 32,  40,  13,  44,  33,  -14,
  -25, 13,  28,  2,   28,  21,  -20, -36, -12, 6,   -14, -30, 28,  52,  30,
  -19, -40, -23, 6,   19,  18,  6,   -18, -18, 0,   8,   8,   18,  -6,  2,
  20,  20,  -10, -28, -9,  20,  14,  32,  20,  -24, -43, -20, 12,  29,  -18,
  -20, -4,  -26, -45, -18, 22,  11,  4,   34,  26,  -9,  -8,  14,  -9,  -48,
  34,  46,  12,  -8,  12,  6,   -27, -18, 11,  -3,  -14, 12,  20,  2,   14,
  42,  8,   10,  1,   -19, -24, -12, -26, -43, 4,   11,  13,  30,  50,  42,
  12,  2,   4,   -2,  2,   22,  30,  18,  12,  12,  -25, -44, -36, -24, -20,
  -14, -3,  -5,  28,  42,  -4,  -44, -17, 23,  28,  -6,  12,  -13, -12, 18,
  20,  -10, -26, -16, -7,  10,  18,  -7,  -20, -2,  10,  -10, 12,  8,   -21,
  -14, 36,  54,  6,   -44, -28, -26, 0,   -16, -18, 28,  26,  -14, 17,  48,
  6,   -30, 0,   -4,  -24, 16,  31,  3,   -15, 12,  -4,  -26, 29,  44,  -6,
  -6,  24,  6,   -24, 2,   0,   -48, -24, -4,  30,  20,  8,   22,  2,   -34,
  -15, -17, -40, -45, 10,  36,  10,  -18, 8,   14,  -14, -14, 16,  19,  11,
  4,   52,  33,  -30, -25, -4,  0,   4,   -4,  -35, -25, 32,  36,  -20, -46,
  3,   38,  -12, -1,  -4,  6,   22,  7,   -16, -24, -18, -30, 5,   26,  4,
  -8,  0,   -16, -12, 2,   4,   -24, -12, 44,  29,  -28, 4,   1,   18,  8,
  -1,  11,  24,  12,  -20, -20, -16, -16, -38, -44, -23, -6,  -4,  18,  46,
  50,  36,  22,  14,  19,  -11, -30, -30, -10, 0,   -18, -18, 2,   26,  9,
  6,   22,  -14, -22, 4,   9,   -47, -42, 14,  4,   12,  15,  -16, 14,  16,
  32,  -16, -17, 14,  -40, -20, 35,  16,  -18, -9,  43,  6,   -12, 19,  -32,
  36,  -6,  -18, 21,  -12, -7,  38,  -30, -7,  -9,  32,  -2,  -42, 30,  20,
  -50, -33, -9,  14,  -21, -6,  21,  17,  22,  -18, 10,  24,  -8,  -20, -2,
  10,  -17, 30,  -2,  -25, 17,  34,  -6,  -10, -13, 22,  7,   -28, -34, -17,
  16,  38,  -1,  29,  26,  20,  32,  -5,  -28, -17, -26, -14, -30, -3,  1,
  -8,  34,  35,  -14, -36, 0,   48,  -3,  -24, 16,  8,   -36, -31, -19, -11,
  2,   2,   9,   32,  14,  2,   16,  35,  -8,  -48, -16, -6,  -8,  -45, -14,
  24,  10,  22,  4,   -14, 10,  0,   26,  2,   -19, 18,  1,   -20, 31,  -30,
  -14, -20, 4,   16,  -8,  -6,  -40, 45,  27,  -15, -16, -12, 36,  40,  -9,
  -22, -12, 40,  1,   -40, -5,  10,  -2,  22,  -3,  10,  -10, -22, 34,  2,
  -22, -48, 2,   40,  -14, -9,  -17, -8,  40,  -2,  -2,  -20, 8,   28,  10,
  -8,  -58, 4,   3,   16,  -14, -30, 24,  26,  6,   30,  -4,  -6,  15,  -9,
  -16, 22,  -12, -32, 2,   4,   12,  2,   -6,  19,  -17, 50,  -32, -32, 42,
  -21, -20, 22,  3,   24,  0,   3,   -16, 20,  18,  -50, 25,  42,  -36, 4,
  34,  -22, -5,  10,  -1,  27,  -2,  -14, -22, 42,  0,   -30, 11,  -27, 28,
  5,   -8,  -24, 2,   47,  -33, 4,   -14, 0,   25,  -9,  -6,  -19, 22,  -8,
  7,   10,  -32, 16,  10,  -26, 16,  -33, 30,  20,  -18, 0,   2,   28,  -30,
  -59, 2,   2,   21,  -20, -24, 26,  2,   43,  -31, -10, 30,  -8,  4,   -4,
  -2,  -22, 0,   14,  2,   -20, -2,  29,  -21, 36,  -24, -14, 50,  -16, -33,
  34,  -6,  9,   -8,  -18, 10,  -2,  0,   18,  -24, 37,  -17, -6,  33,  -24,
  -20, 39,  -8,  -2,  -2,  0,   2,   -2,  -2,  8,   -6,  6,   4,   -11, 10,
  16,  -40, 38,  -18, -36, 58,  -48, 0,   41,  -31, 2,   11,  -34, 25,  5,
  -18, 0,   18,  -18, 4,   -21, 29,  -30, 10,  21,  -46, 50,  -28, -34, 42,
  -30, 2,   20,  -16, -8,  22,  -18, 7,   9,   -15, -3,  25,  -22, 1,   20,
  -22, 14,  3,   -14, 8,   -6,  5,   -50, 46,  -30, 17,  -6,  0,   0,   0,
  28,  -42, 30,  -9,  -20, 29,  -22, 7,   -6,  16,  -6,  4,   12,  -20, 18,
  -10, 10,  -24, 14,  -4,  -17, 32,  -34, 19,  -20, 33,  -29, 7,   8,   -14,
  14,  -6,  -24, 14,  8,   -12, 2,   4,   -6,  3,   4,   -10, 5,   8,   2,
  -31, 52,  -34, -36, 43,  -36, 11,  20,  -40, 29,  -1,  6,   -24, 44,  -58,
  61,  -50, 34,  -16, 15,  -28, 26,  -10, -5,  14,  -14, 12,  2,   6,   -12,
  7,   0,   -2,  8,   -7,  -8,  10,  -6,  4,   -8,  5,   -6,  4,   4,   -5,
  4,   -1,  0,   2,   -4,  4,   -11, 20,  -34, 43,  -49, 47,  -35, 15,  -24,
  36,  -40, 32,  -20, 5,   5,   -9,  2,   -5,  14,  -21, 22,  -17, 12,  -3,
  -9,  10,  -10, 6,   1,   -6,  6,   -2,  14,  -24, 36,  -38, 32,  -22, 8,
  -2,  -10, 14,  -22, 30,  -30, 24,  -13, 4,   12,  -20, 29,  -40, 44,  -40,
  29,  -12, 8,   -11, 11,  -10, 9,   -6,  2,   1,   0,   7,   -12, 8,   -3,
  2,   2,   -2,  4,   -14, 28,  -44, 48,  -44, 32,  -16, 24,  -36, 43,  -44,
  34,  -20, 8,   3
};

static const int32_t mdt8x4_mode8[1024] = {
  1,   2,   4,   5,   5,   6,   10,  24,  4,   6,   12,  14,  14,  21,  31,
  36,  6,   14,  17,  18,  26,  36,  38,  36,  10,  18,  21,  28,  37,  39,
  36,  30,  -4,  2,   8,   10,  14,  10,  -2,  -11, 2,   10,  20,  28,  24,
  6,   -14, -24, 12,  25,  38,  36,  16,  -8,  -23, -30, 28,  44,  46,  27,
  4,   -19, -31, -32, -2,  7,   18,  20,  6,   -12, -15, -6,  8,   24,  34,
  18,  -16, -32, -18, 4,   25,  38,  24,  -14, -37, -28, 3,   27,  31,  22,
  -12, -34, -28, 0,   28,  38,  12,  20,  22,  5,   -14, -8,  12,  13,  30,
  40,  18,  -22, -24, 14,  26,  -2,  43,  24,  -20, -32, 4,   30,  8,   -26,
  28,  -6,  -26, -6,  20,  7,   -27, -40, 9,   2,   3,   9,   29,  40,  31,
  6,   12,  16,  7,   30,  56,  42,  18,  -2,  16,  2,   -2,  16,  11,  -4,
  -7,  3,   -9,  -36, -32, -34, -38, -18, 4,   8,   9,   26,  22,  6,   6,
  6,   -18, -38, 30,  30,  3,   -2,  12,  -9,  -45, -33, 24,  -8,  -25, 6,
  20,  -10, -14, 9,   -21, -37, -2,  42,  36,  10,  16,  30,  30,  29,  -8,
  -38, -29, 6,   13,  8,   40,  2,   -42, -40, 0,   15,  6,   6,   22,  -12,
  -10, 14,  7,   -20, -10, 16,  28,  31,  28,  4,   -34, -26, 10,  25,  20,
  20,  8,   4,   8,   -16, -22, 18,  35,  17,  0,   22,  8,   -33, 0,   48,
  6,   -24, 4,   25,  -20, -20, 32,  10,  -34, -22, 25,  4,   -20, 4,   -6,
  -55, -26, -20, 24,  19,  -22, -24, 4,   26,  -12, 23,  31,  -6,  -20, 4,
  21,  21,  0,   2,   -8,  4,   18,  -2,  -16, 10,  -26, -22, 19,  32,  -15,
  -64, -26, 36,  48,  34,  14,  24,  0,   -11, 16,  12,  32,  -8,  16,  13,
  -22, 6,   18,  -27, -42, -17, 30,  -8,  -8,  20,  -24, -24, -44, 19,  12,
  -23, 8,   8,   -6,  30,  -31, 10,  46,  10,  5,   44,  48,  30,  -20, 22,
  3,   -28, -4,  6,   -10, -4,  -12, -6,  -17, -15, -26, -38, -13, -1,  -18,
  16,  28,  6,   0,   28,  24,  -20, 30,  -4,  -26, 25,  59,  27,  13,  34,
  12,  -30, -12, 10,  -12, -26, 6,   17,  11,  3,   -20, -27, -22, -18, -14,
  0,   26,  -6,  -2,  38,  24,  -18, -22, 18,  -22, -28, -34, -2,  1,   -34,
  22,  28,  10,  3,   -20, 12,  -14, -10, 20,  -32, 55,  4,   11,  22,  -15,
  -2,  -21, -36, -16, -28, 24,  0,   -8,  30,  31,  10,  -9,  0,   18,  44,
  36,  6,   -10, -44, -6,  -10, -14, -4,  -18, 8,   18,  -20, 16,  -24, -32,
  -10, -6,  40,  35,  -1,  10,  4,   50,  -6,  -42, -3,  1,   6,   -10, -16,
  -28, -35, -10, 46,  22,  -46, 18,  8,   12,  2,   -20, 8,   10,  0,   22,
  8,   33,  -18, -42, 6,   18,  28,  -38, -4,  18,  2,   19,  -11, -32, 4,
  46,  -34, -32, 40,  -15, -10, 20,  -8,  6,   -14, 21,  -13, -8,  22,  -27,
  -5,  6,   22,  0,   -28, 28,  -7,  -6,  30,  -19, 4,   9,   12,  -16, -10,
  40,  -43, -21, -5,  -13, -15, 36,  19,  -48, 14,  18,  17,  -10, -24, 16,
  -6,  -9,  29,  8,   28,  2,   -38, 23,  24,  -17, -32, -48, 33,  6,   -10,
  -10, -8,  18,  7,   -49, -20, 7,   35,  -10, -21, 3,   0,   46,  -14, -20,
  22,  14,  18,  -8,  10,  20,  -50, -2,  -18, 5,   -12, -18, 26,  0,   37,
  -12, -25, 34,  -5,  -12, -6,  -30, 42,  -7,  8,   16,  21,  17,  -34, 2,
  -14, -1,  4,   -60, -12, 19,  29,  4,   -11, 28,  20,  39,  -7,  -22, -8,
  4,   -7,  -28, 6,   -4,  -16, 36,  -20, 26,  -34, 6,   -3,  -18, 30,  20,
  -10, -10, 2,   18,  6,   -12, -41, -24, 38,  18,  -14, -26, 20,  36,  18,
  -30, -7,  5,   -1,  24,  -47, 4,   27,  -22, 14,  -16, -6,  -15, -16, 25,
  10,  22,  44,  16,  26,  0,   2,   -24, -36, -32, -52, -14, -11, -4,  20,
  26,  32,  34,  33,  -2,  17,  -16, -10, -7,  -23, -4,  -10, 10,  12,  -24,
  -12, 46,  -38, -4,  -18, -28, 46,  -7,  -2,  -6,  11,  32,  -1,  -12, 8,
  -28, 14,  -6,  -5,  -48, 50,  -6,  12,  12,  -21, 19,  6,   -8,  -16, -3,
  -40, -6,  -13, -11, 2,   16,  -33, 39,  30,  8,   32,  8,   -28, 43,  -2,
  -46, 2,   -40, -10, 4,   -20, 8,   -27, 9,   24,  -10, 24,  -10, 2,   23,
  2,   6,   -39, 15,  32,  18,  11,  -21, -6,  24,  -8,  -9,  -58, -14, 3,
  24,  -11, -3,  23,  12,  52,  10,  -36, 16,  6,   -16, 8,   -27, -5,  0,
  26,  -29, 6,   -4,  10,  22,  24,  -10, -19, 46,  -20, 1,   0,   -74, 8,
  16,  -30, -12, 15,  -14, 62,  8,   -2,  2,   20,  4,   6,   -16, -7,  0,
  -4,  4,   -10, -13, 2,   2,   -40, 8,   8,   13,  5,   -6,  -2,  26,  37,
  -16, -24, -8,  18,  -24, 20,  -40, -17, 36,  10,  -32, 32,  -22, -8,  44,
  -37, 10,  -4,  10,  -14, 24,  -6,  30,  -32, 64,  -32, 7,   8,   -15, 4,
  -10, -29, -12, 14,  -6,  -9,  24,  -17, 24,  4,   -4,  11,  -10, 6,   -4,
  6,   -12, 8,   -3,  -15, 35,  -45, 42,  -20, 25,  1,   -26, 28,  0,   -6,
  16,  -12, -40, 44,  -12, -10, 4,   6,   -12, 14,  19,  -28, 2,   16,  -10,
  -17, 44,  -43, -13, 30,  -16, -11, 34,  -34, 14,  16,  -13, 2,   2,   -24,
  26,  -26, 20,  -4,  26,  -30, 22,  12,  -30, 49,  -44, 25,  -10, 32,  -46,
  34,  -20, -1,  16,  -22, -8,  7,   2,   -8,  6,   -6,  0,   7,   4,   -6,
  15,  -14, 24,  -33, 40,  -20, -2,  -16, 32,  -39, 36,  -28, -4,  14,  20,
  -26, 12,  10,  -25, 36,  -18, 2,   -9,  24,  -34, 34,  -24, 6,   0,   -1,
  10,  -4,  -4,  22,  -32, 32,  -26, 12,  -12, 15,  -24, 34,  -25, 17,  -10,
  5,   10,  2,   -20, 29,  -36, 35,  -29, 10,  -16, 31,  -38, 36,  -26, 14,
  -2,  -4,  22,  -28, 34,  -33, 31,  -20, 10,  -3,  -14, 21,  -28, 29,  -32,
  28,  -18, 8,   9,   -19, 32,  -34, 31,  -22, 10,  -3,  -2,  6,   -13, 22,
  -26, 28,  -22, 9
};

static const int32_t mdt8x4_mode9[1024] = {
  1,   0,   0,   2,   6,   8,   13,  21,  0,   0,   4,   12,  18,  24,  32,
  34,  1,   8,   16,  26,  32,  36,  36,  33,  7,   18,  28,  34,  36,  34,
  32,  30,  -2,  -4,  0,   12,  22,  21,  8,   -9,  -2,  4,   20,  38,  38,
  18,  -10, -26, 6,   24,  40,  40,  20,  -8,  -28, -32, 18,  32,  30,  12,
  -10, -24, -30, -26, 6,   22,  35,  38,  20,  -2,  -12, -5,  14,  38,  50,
  32,  -7,  -26, -14, 8,   19,  32,  20,  -12, -29, -16, 12,  24,  12,  6,
  -14, -26, -14, 12,  26,  26,  4,   18,  26,  17,  4,   8,   22,  34,  14,
  34,  23,  -2,  4,   30,  42,  20,  18,  8,   -20, -16, 16,  31,  6,   -26,
  -10, -34, -33, -8,  5,   -10, -34, -42, 5,   18,  20,  -2,  -28, -34, -20,
  -12, 15,  27,  8,   -31, -47, -26, -8,  -14, 12,  18,  0,   -10, 7,   18,
  -2,  -23, 23,  34,  32,  40,  38,  10,  -18, -20, -6,  -18, -21, -22, -30,
  -22, 13,  38,  -12, -12, -2,  -10, -20, 1,   38,  38,  6,   32,  34,  -3,
  -24, -8,  9,   2,   28,  40,  4,   -33, -38, -19, -7,  -10, 30,  49,  23,
  -28, -24, 23,  26,  4,   38,  32,  -22, -34, 12,  30,  -1,  -8,  10,  -10,
  -11, 12,  3,   -27, -20, 10,  2,   12,  22,  -2,  -32, -17, 17,  28,  2,
  -6,  -24, -48, -32, 1,   -12, -48, 8,   15,  5,   -3,  18,  26,  -12, -30,
  24,  36,  18,  2,   19,  29,  18,  2,   14,  -9,  -42, -34, 7,   23,  8,
  -3,  16,  22,  8,   -4,  -16, -42, -50, -24, 14,  6,   -2,  16,  6,   -14,
  3,   30,  -16, -25, 15,  46,  22,  12,  27,  24,  -28, -18, 12,  -8,  -30,
  -28, -18, -20, -36, -30, 22,  22,  -30, -37, 0,   2,   -29, 6,   25,  -10,
  -10, 22,  7,   -23, 4,   10,  -8,  6,   37,  10,  -26, 3,   -8,  -16, -4,
  10,  -17, -40, 8,   59,  -25, -26, -28, -34, -14, 8,   8,   24,  8,   39,
  16,  -3,  0,   -26, -18, 20,  29,  22,  10,  25,  -8,  -40, -8,  7,   -35,
  -46, 11,  37,  8,   5,   4,   -12, -20, -19, 7,   8,   22,  36,  -20, -37,
  -17, 4,   -8,  -32, 10,  10,  -12, 30,  26,  21,  -36, -21, 10,  -8,  26,
  45,  29,  10,  7,   22,  -17, -36, -15, -20, 44,  12,  -51, -12, 35,  8,
  -21, 6,   24,  -6,  -6,  10,  -20, -18, 12,  10,  14,  21,  6,   -12, 9,
  18,  -20, -3,  11,  -12, -19, 20,  12,  -44, -24, 52,  0,   -8,  -28, -30,
  -29, 2,   16,  -16, 10,  18,  56,  48,  6,   14,  4,   -2,  -17, -40, -30,
  -42, -20, 8,   5,   18,  -2,  20,  26,  8,   2,   -16, -16, 4,   26,  8,
  5,   13,  -6,  28,  33,  -31, -16, -20, 16,  -18, -46, 20,  10,  -23, -23,
  18,  52,  -7,  -20, 6,   15,  28,  -38, -24, 9,   20,  0,   -18, -2,  -15,
  -10, -35, -29, 26,  30,  -2,  -10, -15, 35,  24,  -16, -12, -12, 11,  24,
  -23, 31,  -7,  -4,  -4,  -20, 30,  20,  -30, -31, 2,   46,  -15, -36, 8,
  22,  4,   -42, 0,   28,  -24, 6,   30,  -32, -34, -4,  20,  -6,  -14, 5,
  10,  29,  37,  -22, -8,  29,  -2,  -29, -4,  -18, -26, -23, 10,  0,   -16,
  30,  4,   -28, 36,  26,  8,   -4,  20,  -16, -42, -24, -28, -2,  -26, -7,
  14,  32,  42,  36,  12,  22,  23,  -8,  -20, -32, -45, -16, -11, -2,  -18,
  6,   31,  12,  12,  14,  -7,  -12, 26,  29,  -32, 1,   -6,  -15, 36,  -28,
  -7,  -25, 15,  38,  -10, -14, -34, 8,   26,  5,   -30, -34, 28,  44,  -10,
  -18, -8,  18,  20,  -10, -22, -8,  14,  31,  16,  -4,  -26, 6,   28,  -26,
  -6,  -56, -2,  45,  -12, -12, -8,  10,  16,  -11, 2,   -20, 5,   18,  2,
  3,   -52, 8,   -14, 16,  8,   -38, 18,  34,  0,   6,   -4,  -20, 3,   18,
  -14, -34, 30,  12,  23,  8,   -28, 21,  28,  -30, 8,   -56, 22,  20,  -46,
  22,  4,   -26, 11,  -27, 17,  1,   -2,  0,   -3,  26,  -22, -28, 14,  -13,
  -20, 38,  -17, -14, 4,   -2,  34,  2,   -4,  -12, 9,   48,  -48, -36, -14,
  0,   22,  -13, -27, 19,  14,  40,  -6,  -26, 24,  0,   -12, 16,  -13, 29,
  -36, 0,   25,  -19, 3,   -11, 17,  8,   12,  14,  -32, 20,  24,  -35, 8,
  -18, -26, 21,  18,  -42, 12,  25,  -18, 50,  -29, -5,  16,  -4,  3,   -22,
  19,  38,  -6,  -15, 6,   18,  -19, 4,   6,   -48, 31,  4,   -24, 18,  -5,
  15,  -24, -2,  14,  -22, 14,  0,   -16, 0,   32,  -18, 6,   24,  -35, 14,
  30,  -57, 16,  20,  -30, 22,  -9,  -8,  26,  -46, 34,  25,  -32, 28,  -4,
  -16, 18,  6,   -27, 18,  -6,  -12, 14,  12,  -39, 35,  -3,  -32, 36,  -18,
  -5,  19,  -8,  -6,  3,   13,  -22, 2,   13,  -14, -2,  37,  -28, 24,  11,
  -9,  -2,  27,  -40, 14,  6,   -52, 38,  -20, -2,  16,  -20, 42,  -35, -16,
  16,  -20, 16,  -8,  -8,  -2,  16,  4,   -32, 34,  -14, -12, 25,  -24, 10,
  36,  -17, -8,  20,  -4,  -17, 30,  -18, -30, 28,  -8,  -13, 9,   9,   -31,
  27,  28,  -39, 30,  -2,  -25, 33,  -17, -4,  -48, 50,  -32, 12,  4,   -4,
  0,   4,   24,  -30, 18,  -6,  -18, 28,  -23, 4,   -12, 18,  -7,  -2,  14,
  -20, 26,  -9,  0,   -9,  8,   6,   -28, 39,  -45, 22,  3,   -13, 28,  -42,
  50,  -41, 28,  -15, 26,  -38, 45,  -42, 28,  -15, 4,   4,   17,  -15, 14,
  -6,  -1,  8,   -9,  6,   -4,  2,   -5,  12,  -14, 9,   -6,  2,   11,  -16,
  18,  -21, 20,  -14, 6,   -3,  -2,  6,   -12, 24,  -32, 36,  -26, 16,  -16,
  29,  -40, 41,  -40, 29,  -20, 5,   -20, 27,  -28, 26,  -22, 16,  -6,  0,
  -4,  10,  -18, 26,  -29, 23,  -16, 4,   -8,  5,   3,   -14, 25,  -28, 24,
  -15, 17,  -21, 16,  -5,  -8,  20,  -24, 19,  -20, 34,  -44, 46,  -42, 32,
  -14, -1,  20,  -26, 21,  -17, 18,  -13, 8,   -4,  -16, 29,  -34, 32,  -27,
  18,  -10, 7,   15,  -29, 37,  -42, 40,  -30, 18,  -9,  3,   2,   -11, 21,
  -26, 26,  -20, 10
};

static const int32_t mdt8x4_mode10[1024] = {
  0,   0,   2,   7,   9,   12,  15,  17,  0,   2,   10,  21,  26,  28,  30,
  24,  2,   13,  24,  32,  36,  36,  30,  22,  9,   24,  32,  36,  34,  30,
  26,  24,  -4,  -8,  -5,  8,   15,  15,  10,  -6,  -6,  -6,  8,   30,  35,
  20,  -6,  -28, 2,   14,  30,  35,  18,  -13, -39, -42, 10,  24,  25,  10,
  -16, -37, -43, -34, 4,   17,  27,  28,  13,  -8,  -20, -17, 10,  37,  50,
  34,  -8,  -39, -34, -10, 20,  36,  29,  2,   -24, -22, 2,   16,  21,  20,
  4,   -10, -5,  10,  17,  20,  10,  26,  32,  12,  -5,  4,   20,  20,  22,
  47,  29,  -12, -10, 24,  36,  13,  29,  27,  -14, -29, 4,   29,  6,   -28,
  8,   -12, -24, -6,  12,  -1,  -30, -39, 13,  16,  2,   -18, -28, -28, -26,
  -31, 10,  7,   -12, -34, -38, -21, -19, -32, -3,  0,   -1,  0,   16,  24,
  -2,  -23, 14,  28,  36,  44,  40,  14,  -14, -15, 3,   -6,  -12, -20, -30,
  -27, 4,   42,  -7,  -11, -8,  -19, -28, -16, 30,  46,  4,   24,  29,  5,
  -21, -12, 6,   8,   31,  46,  20,  -13, -34, -24, -12, -3,  38,  34,  -7,
  -44, -16, 29,  12,  -24, 46,  28,  -22, -27, 18,  38,  -4,  -20, 18,  7,
  8,   12,  2,   -12, -10, 16,  3,   8,   7,   -20, -29, -8,  23,  26,  22,
  31,  22,  22,  0,   -16, 5,   37,  36,  15,  -4,  6,   -8,  -28, -2,  28,
  -2,  -35, -13, 35,  14,  -30, -16, 9,   -40, -28, 28,  34,  -6,  -25, -9,
  6,   -17, -8,  0,   -20, -44, -55, -42, -16, -2,  16,  16,  14,  14,  7,
  2,   1,   0,   10,  16,  38,  42,  26,  12,  4,   -19, -33, -28, -20, -22,
  -14, -5,  5,   -34, -26, 18,  17,  -20, -8,  31,  14,  -25, 14,  20,  -27,
  -20, 21,  4,   -34, 9,   15,  -16, -16, 12,  -1,  -32, -2,  -3,  -4,  12,
  24,  -8,  -34, 15,  64,  -45, 12,  60,  -12, -22, 17,  -8,  -23, -33, 20,
  12,  -27, 16,  24,  0,   17,  -25, -18, -2,  11,  -19, -30, 13,  12,  -20,
  16,  27,  0,   -11, 15,  8,   -35, 6,   -4,  9,   32,  35,  6,   -54, -42,
  3,   -10, -12, -14, 8,   15,  10,  28,  18,  1,   -28, -22, 10,  17,  21,
  26,  17,  10,  14,  20,  -26, -51, -18, 10,  -34, -20, -30, -42, 10,  28,
  -11, 14,  -6,  28,  -6,  -22, 17,  -18, -34, 30,  38,  38,  -6,  6,   6,
  -27, -4,  15,  2,   -26, -12, 36,  25,  -3,  -14, -10, -26, -40, -14, 16,
  4,   -39, -16, -12, 45,  16,  -30, 10,  20,  12,  40,  -6,  32,  9,   -5,
  -8,  -36, -24, -3,  -28, -28, 5,   26,  4,   3,   26,  18,  -4,  9,   -16,
  -30, -4,  4,   26,  6,   -42, 9,   3,   36,  -3,  -50, 12,  32,  6,   -21,
  4,   48,  2,   -26, -4,  7,   17,  -44, -22, 2,   14,  16,  -20, -18, 0,
  -8,  14,  21,  -12, 34,  7,   -52, 28,  3,   10,  -14, -23, 10,  8,   2,
  18,  -32, 0,   34,  -6,  -8,  10,  -32, -33, -18, 14,  -16, -23, 32,  0,
  -18, 48,  28,  18,  -10, -8,  32,  -3,  -20, 19,  -48, 8,   6,   -19, -4,
  4,   6,   -14, 5,   11,  12,  14,  -24, 8,   28,  -49, 2,   -43, 20,  26,
  -40, 6,   39,  -4,  16,  36,  6,   -31, -27, -16, 0,   -25, -24, -16, 4,
  41,  30,  2,   38,  8,   -7,  6,   -20, -12, -32, -32, -5,  -10, 24,  -13,
  -17, 36,  27,  -10, -17, 31,  -12, 4,   -26, -36, -10, 5,   -2,  26,  6,
  26,  24,  36,  25,  -6,  -24, -7,  -11, -22, -12, -50, -23, 43,  20,  2,
  -28, 13,  43,  2,   -16, -16, -17, 7,   -45, 14,  6,   -16, 19,  28,  20,
  -21, -4,  22,  -26, 14,  -26, -44, 32,  -12, 24,  -25, -12, 43,  -6,  20,
  26,  -20, 13,  2,   0,   -18, -10, -4,  -24, 28,  4,   -48, 33,  -10, -34,
  33,  -16, 6,   42,  -28, 25,  4,   -4,  9,   -22, 20,  12,  -35, 10,  12,
  -22, 10,  10,  -36, 40,  -22, -4,  16,  -4,  -1,  6,   12,  -11, 12,  34,
  16,  -6,  -15, 23,  14,  6,   -20, -49, -10, 20,  4,   -24, -32, 11,  15,
  51,  -4,  -38, 20,  38,  26,  -8,  -22, -10, 16,  11,  -22, -22, -2,  52,
  -31, 27,  3,   -25, 24,  2,   -7,  -28, -18, -4,  -4,  12,  -23, -5,  6,
  28,  36,  -19, 5,   7,   -2,  18,  -16, -54, 10,  18,  -24, 2,   18,  -32,
  23,  12,  -33, 5,   -2,  7,   6,   4,   13,  28,  26,  2,   -12, 18,  -22,
  12,  -28, -68, 24,  -24, 10,  8,   -25, 52,  -10, 6,   21,  -27, 15,  -2,
  -24, 5,   -1,  26,  -24, -12, 3,   13,  -20, -17, 25,  -18, 24,  24,  -22,
  7,   27,  8,   -35, 15,  -39, -14, 32,  -26, -13, 6,   39,  26,  -2,  6,
  -15, 18,  18,  -49, 8,   18,  -21, -13, 27,  -7,  -16, 40,  -39, -12, 45,
  -14, -24, 36,  -22, -12, 42,  -33, -7,  15,  -3,  -12, 25,  -22, -9,  26,
  -24, 12,  0,   -10, 14,  -14, 12,  14,  -32, 46,  -40, 20,  7,   -12, 6,
  4,   0,   -13, 17,  -2,  -29, 38,  -22, -14, 18,  2,   -12, 4,   22,  -44,
  40,  16,  -33, 26,  -4,  -6,  3,   10,  -22, -10, 6,   12,  -36, 46,  -39,
  34,  -18, 24,  -45, 54,  -44, 30,  -22, 4,   2,   14,  -6,  3,   -3,  6,
  4,   4,   -4,  -12, 8,   -4,  4,   -12, 9,   -8,  7,   -30, 24,  -14, 16,
  -8,  14,  -11, 8,   28,  -25, 4,   -2,  -10, 11,  0,   -9,  -33, 38,  -10,
  -7,  12,  -14, 7,   4,   18,  -36, 28,  2,   -36, 54,  -48, 20,  2,   -10,
  16,  -26, 34,  -33, 24,  -10, 6,   -2,  -10, 26,  -36, 46,  -43, 27,  -20,
  33,  -40, 32,  -24, 11,  4,   -6,  0,   -4,  16,  -16, 14,  -11, -2,  3,
  4,   -2,  1,   3,   -4,  8,   -6,  4,   2,   1,   -2,  4,   -4,  2,   -2,
  -1,  -3,  10,  -18, 28,  -36, 38,  -35, 16,  -24, 37,  -52, 54,  -46, 31,
  -9,  -2,  14,  -23, 23,  -25, 24,  -17, 12,  -4,  -12, 24,  -23, 27,  -27,
  20,  -10, 6,   8,   -28, 32,  -40, 40,  -33, 18,  -6,  -1,  10,  -18, 28,
  -32, 30,  -24, 12
};

static const int32_t mdt8x4_mode11[1024] = {
  2,   5,   4,   6,   7,   8,   13,  21,  3,   6,   8,   12,  17,  23,  31,
  35,  2,   8,   16,  25,  32,  36,  37,  36,  6,   16,  24,  31,  34,  35,
  34,  32,  2,   4,   12,  24,  30,  26,  11,  -4,  5,   19,  37,  46,  38,
  16,  -7,  -18, 11,  30,  41,  31,  10,  -11, -24, -24, 14,  26,  19,  0,
  -16, -24, -23, -19, 8,   30,  46,  44,  28,  4,   -9,  -10, 12,  34,  36,
  18,  -8,  -21, -14, 4,   7,   8,   -10, -24, -26, -8,  14,  24,  -10, -25,
  -35, -29, -6,  18,  27,  26,  12,  26,  28,  14,  3,   15,  29,  31,  8,
  14,  0,   -10, 8,   36,  38,  15,  0,   -19, -34, -9,  25,  24,  -4,  -26,
  -22, -40, -25, 6,   8,   -16, -36, -36, 4,   23,  34,  14,  -24, -42, -25,
  -8,  17,  34,  14,  -24, -39, -27, -10, -14, 10,  19,  4,   -6,  10,  20,
  0,   -22, 15,  24,  26,  38,  35,  8,   -20, -26, -13, -25, -20, -18, -28,
  -28, 4,   37,  0,   14,  28,  6,   -16, 0,   33,  36,  28,  50,  27,  -14,
  -16, 8,   18,  0,   14,  3,   -30, -38, -16, -2,  -10, -21, 28,  56,  32,
  -27, -50, -17, 12,  14,  20,  14,  -16, -16, 12,  16,  6,   6,   -1,  -4,
  9,   20,  0,   -26, -13, 16,  4,   18,  16,  -16, -44, -22, 18,  24,  -6,
  -6,  -14, -38, -33, -9,  -16, -44, 10,  28,  18,  5,   22,  19,  -20, -33,
  22,  18,  4,   25,  41,  17,  -3,  6,   -20, -48, -34, 1,   12,  2,   3,
  15,  20,  20,  4,   8,   1,   -36, -49, -31, -14, -28, -2,  34,  12,  -8,
  10,  20,  -34, -28, 18,  19,  10,  34,  34,  12,  -14, 2,   -2,  -27, -18,
  -10, -21, -32, -44, -44, 22,  46,  -1,  -34, -22, 0,   -19, 5,   8,   -17,
  -4,  21,  13,  4,   4,   -4,  -20, -2,  27,  8,   -12, 10,  -4,  2,   14,
  6,   -34, -48, -4,  44,  -4,  -9,  -23, -8,  3,   -7,  -8,  26,  18,  28,
  21,  16,  -10, -38, -4,  38,  -6,  -20, 10,  29,  -14, -32, -5,  4,   -53,
  -42, 34,  36,  -9,  -14, -4,  -3,  -12, -6,  4,   -7,  9,   38,  -10, -42,
  16,  25,  -20, -30, 16,  12,  -12, 32,  30,  12,  -18, -12, -9,  -11, 37,
  49,  10,  6,   18,  12,  -19, -18, -16, -44, -43, -30, 26,  20,  -22, -6,
  29,  16,  6,   15,  -8,  -12, 7,   -6,  -24, -16, -8,  -30, 2,   39,  14,
  -6,  12,  -2,  -10, 6,   6,   -38, -14, 48,  22,  -47, 0,   -2,  10,  16,
  -4,  -34, -21, 1,   -2,  -12, -31, 6,   43,  40,  17,  -21, 19,  28,  12,
  -26, -47, -11, 6,   -20, -38, -22, 26,  18,  0,   22,  26,  -16, 12,  10,
  11,  28,  26,  2,   0,   14,  -9,  -32, -49, -38, -22, -20, -14, 4,   20,
  44,  43,  42,  22,  -4,  -2,  10,  -10, -28, -26, 2,   -2,  -10, -2,  -2,
  -6,  -2,  -24, -2,  39,  10,  -26, -22, 54,  39,  -24, -32, -18, 14,  40,
  2,   -8,  -14, 20,  14,  -8,  18,  -8,  -38, -10, 14,  2,   -32, -12, 14,
  6,   22,  6,   2,   -13, -3,  22,  -24, -38, 40,  26,  5,   -27, 18,  47,
  -26, -24, 20,  36,  -6,  -46, 5,   27,  -2,  -4,  -22, 35,  6,   -16, 2,
  -8,  9,   9,   1,   11,  4,   -21, -3,  10,  4,   26,  34,  20,  8,   -12,
  12,  -10, -18, -23, -56, 9,   6,   -2,  -24, 2,   59,  40,  11,  -20, -2,
  30,  -7,  -32, -28, 1,   6,   52,  1,   -39, 18,  12,  -8,  -2,  -12, -18,
  -8,  40,  -18, -32, 21,  10,  -7,  18,  4,   -27, 8,   30,  -14, -5,  -2,
  6,   -6,  18,  4,   -40, 18,  44,  -33, 20,  -15, -32, 37,  3,   -41, 14,
  10,  50,  7,   -7,  6,   0,   29,  -2,  -24, -14, -22, 13,  1,   -11, -20,
  -13, 56,  23,  0,   -23, 6,   30,  -16, -12, -14, -22, 12,  12,  -38, 36,
  -1,  -34, 37,  -32, 24,  12,  -20, 0,   14,  14,  -42, -31, -9,  8,   20,
  -18, -12, 28,  9,   34,  -11, -24, 30,  -12, -8,  12,  -14, 16,  -6,  -17,
  8,   -4,  8,   -14, 20,  -11, 29,  2,   -34, 32,  4,   -40, 22,  -69, 30,
  18,  -42, 28,  6,   -18, 1,   -20, 12,  -6,  -3,  -2,  2,   13,  -10, 30,
  -28, -2,  28,  -30, 3,   27,  -24, 8,   7,   0,   -14, 22,  -16, -4,  12,
  -24, -2,  7,   16,  -26, 8,   45,  -46, 44,  -28, -15, 30,  -21, -9,  5,
  18,  44,  -14, -6,  2,   6,   -6,  -8,  18,  -37, 20,  13,  -34, 20,  11,
  -16, -10, 18,  -6,  -13, 25,  -21, -8,  17,  7,   -10, 4,   22,  -33, 16,
  28,  -64, 32,  4,   -10, 16,  -4,  -10, 24,  -35, 26,  35,  -44, 38,  -16,
  -16, 46,  -50, 14,  22,  -30, 25,  -4,  -12, 8,   17,  -20, -8,  6,   -7,
  2,   8,   -13, 10,  2,   -10, 19,  -11, -1,  10,  -14, 14,  -6,  -36, 22,
  -7,  -6,  2,   12,  -28, 26,  26,  -36, 32,  -9,  -25, 50,  -46, 7,   39,
  -36, 20,  -5,  -4,  2,   11,  -6,  32,  -45, 38,  -10, -18, 36,  -37, 16,
  22,  -10, -8,  14,  -6,  -14, 25,  -15, -12, 7,   7,   -10, 6,   14,  -36,
  26,  30,  -38, 26,  -4,  -18, 26,  -12, -4,  -46, 40,  -20, 4,   8,   -14,
  8,   -2,  30,  -35, 20,  -8,  -2,  16,  -15, 4,   -28, 26,  -9,  -5,  8,
  -8,  7,   2,   25,  -32, 23,  3,   -29, 43,  -44, 16,  -15, 27,  -34, 40,
  -43, 40,  -36, 16,  -24, 27,  -30, 30,  -26, 16,  0,   -8,  3,   -7,  8,
  -6,  17,  -28, 24,  -12, 19,  -18, 16,  -20, 18,  -8,  0,   6,   12,  -20,
  26,  -28, 28,  -23, 14,  -6,  5,   8,   -16, 23,  -28, 30,  -26, 20,  -29,
  31,  -26, 14,  1,   -10, 14,  -16, 18,  -26, 35,  -38, 34,  -28, 19,  -2,
  -9,  10,  -4,  0,   6,   -2,  2,   -2,  10,  -22, 32,  -42, 42,  -38, 30,
  -14, 9,   -13, 18,  -20, 21,  -18, 12,  -4,  16,  -27, 34,  -38, 38,  -32,
  20,  -6,  14,  -17, 20,  -21, 24,  -23, 20,  -8,  -7,  13,  -16, 14,  -12,
  6,   -4,  3,   17,  -33, 47,  -52, 50,  -40, 28,  -12, 2,   -4,  -2,  12,
  -18, 20,  -19, 12
};

static const int32_t mdt8x4_mode12[1024] = {
  0,   1,   2,   8,   14,  18,  14,  8,   2,   6,   20,  35,  39,  24,  12,
  8,   -1,  10,  33,  44,  37,  22,  10,  8,   10,  28,  43,  43,  30,  20,
  14,  12,  -4,  4,   24,  36,  38,  18,  2,   5,   2,   20,  44,  52,  46,
  17,  -8,  -6,  8,   8,   -1,  -2,  -8,  -20, -18, -8,  -9,  -25, -33, -34,
  -31, -20, -9,  -4,  -2,  4,   11,  2,   -2,  7,   20,  43,  7,   12,  2,
  -14, -5,  31,  42,  48,  10,  2,   -15, -26, -2,  28,  36,  36,  -8,  -18,
  -26, -24, 1,   21,  32,  32,  9,   12,  20,  22,  -7,  -32, -12, 10,  16,
  30,  40,  12,  -34, -54, -22, 10,  9,   28,  28,  -5,  -32, -18, 5,   18,
  16,  29,  17,  -6,  -6,  22,  26,  20,  2,   -6,  -4,  15,  7,   -24, -24,
  -35, -8,  -22, 0,   28,  24,  -26, -34, -14, -20, -34, -34, -8,  11,  10,
  22,  28,  -10, -30, -24, 14,  32,  36,  30,  22,  -2,  -20, -35, -33, -4,
  2,   -12, -8,  -5,  -28, -28, 12,  34,  5,   -8,  12,  -5,  -2,  18,  24,
  -18, -32, 10,  38,  10,  20,  14,  -34, -54, -10, 28,  30,  -11, -12, 2,
  44,  58,  52,  32,  5,   -16, -24, -26, -4,  -18, -14, 2,   4,   -16, -14,
  -12, -27, -40, -23, -2,  14,  10,  16,  25,  20,  7,   5,   -1,  6,   16,
  28,  22,  -13, 16,  28,  2,   -3,  41,  40,  -24, -44, 10,  -6,  -28, -2,
  17,  -2,  -13, 24,  22,  -34, -24, 17,  -20, -28, 6,   24,  -3,  -9,  25,
  26,  -13, -8,  2,   24,  8,   -40, 1,   68,  -2,  -10, -37, 13,  12,  -45,
  1,   39,  0,   -18, -22, 30,  34,  -9,  -22, -16, -2,  1,   2,   -5,  -5,
  -4,  -12, -6,  -12, -15, 12,  -2,  -40, 0,   39,  26,  -4,  -4,  24,  -10,
  7,   27,  -30, -32, -22, -23, -24, -25, 17,  -8,  -47, -16, 15,  34,  3,
  -15, 0,   13,  28,  30,  -12, -7,  29,  4,   -29, -10, -12, -2,  -13, 4,
  41,  2,   -16, 12,  14,  24,  -31, -52, -11, 9,   -10, -14, 6,   30,  -24,
  -16, 36,  37,  -26, -42, -14, 0,   -22, -16, 12,  42,  20,  -18, -46, -30,
  2,   16,  -12, -24, 4,   19,  0,   -5,  28,  10,  -36, -18, 30,  32,  12,
  -6,  20,  30,  32,  -9,  -30, -18, 5,   15,  43,  36,  -26, -10, -2,  -12,
  13,  2,   50,  29,  -12, 30,  28,  1,   12,  -1,  -18, -28, -38, -30, -23,
  7,   16,  -14, 11,  16,  34,  1,   -16, 8,   -9,  -21, -13, 12,  10,  22,
  0,   12,  27,  -30, 14,  13,  -14, 8,   -39, -12, 28,  -28, -18, -40, 10,
  58,  8,   22,  14,  -22, -14, 4,   -6,  -39, -28, 23,  12,  10,  -10, 28,
  48,  -12, -4,  22,  -24, -20, -1,  1,   -2,  -22, 22,  2,   -10, 42,  -25,
  -23, 2,   4,   8,   -22, 12,  8,   24,  48,  -22, -34, 27,  16,  -24, -26,
  -46, -46, 4,   -2,  -7,  -3,  -10, 8,   16,  20,  -2,  -14, 19,  20,  -17,
  6,   24,  -12, 0,   13,  -42, -14, 14,  -25, -17, -17, 18,  7,   -2,  53,
  19,  -46, -37, 10,  0,   -28, 10,  0,   -41, -16, 1,   16,  -14, 29,  0,
  -6,  48,  16,  -8,  -9,  11,  -25, -19, -4,  -49, -35, -22, 4,   6,   1,
  27,  -1,  19,  41,  41,  34,  46,  19,  9,   -28, -24, 22,  -12, -46, -22,
  -20, 16,  31,  -8,  -16, -12, -2,  33,  0,   -28, 12,  3,   -29, -27, -2,
  12,  4,   -11, 6,   20,  6,   -1,  17,  28,  -46, -4,  40,  -10, 17,  -28,
  -22, 16,  24,  -11, -24, -10, -2,  36,  0,   -44, 14,  -7,  6,   35,  -44,
  22,  -2,  4,   15,  -18, -6,  18,  12,  -16, 20,  38,  18,  -42, -25, 29,
  -21, -8,  -7,  -36, 24,  16,  6,   42,  -28, 37,  22,  -21, 6,   -15, -38,
  0,   26,  13,  6,   -7,  16,  11,  -3,  3,   -8,  -30, 29,  -18, -16, 31,
  -32, 12,  14,  -55, 44,  10,  -38, 28,  -10, 15,  -30, -36, 4,   2,   5,
  -6,  -11, 27,  -6,  20,  -4,  -9,  13,  -10, -2,  8,   2,   -34, 22,  18,
  -7,  -25, 18,  30,  -8,  -24, 16,  -30, 15,  20,  -31, -38, 8,   -3,  14,
  24,  -38, 10,  45,  3,   14,  -38, -8,  29,  -13, -16, -8,  -2,  -14, 16,
  28,  -17, 4,   6,   0,   0,   -24, -34, -16, 20,  -2,  -18, 8,   19,  28,
  -9,  28,  -25, -6,  36,  -28, -28, -1,  -18, -11, 27,  -11, -23, 40,  37,
  -42, 11,  -42, 24,  -16, 14,  6,   2,   8,   25,  -9,  10,  -7,  14,  -36,
  34,  -28, -16, 4,   4,   -20, 24,  -8,  22,  1,   -30, 27,  -8,  -4,  8,
  -36, 52,  -40, 35,  -26, 18,  -18, 8,   1,   4,   -3,  -26, 0,   22,  -28,
  33,  -34, 32,  -19, 32,  -17, -8,  4,   -10, 16,  -26, 21,  -10, -8,  34,
  -31, 6,   32,  -40, 16,  34,  -29, 2,   24,  -24, -1,  35,  -45, -14, 10,
  0,   -20, 32,  -21, 7,   53,  -2,  -4,  16,  -5,  -6,  -1,  2,   -50, 20,
  -12, -18, 21,  -11, -12, 18,  17,  8,   -12, -12, 14,  -18, 5,   1,   0,
  -9,  12,  0,   0,   2,   7,   -8,  2,   -24, 44,  -32, 14,  -2,  -34, 42,
  -27, -63, 18,  16,  -21, 26,  -2,  -29, 36,  -8,  28,  -30, -4,  24,  -28,
  32,  -15, -10, -11, 23,  -10, 0,   8,   -18, 18,  59,  -36, -4,  8,   -15,
  4,   -1,  0,   -42, 43,  -10, -5,  21,  -29, 15,  -6,  44,  -18, -4,  10,
  -14, 19,  -24, 14,  -52, 54,  -28, 19,  -13, 14,  -10, -2,  -2,  -8,  -14,
  24,  -24, 20,  -20, 16,  1,   14,  -8,  -10, 22,  -20, 31,  -25, 0,   -4,
  11,  -8,  14,  -20, 17,  -6,  -2,  0,   -4,  9,   -14, 14,  -11, 2,   5,
  -14, 14,  -6,  12,  -22, 20,  -12, 36,  -49, 52,  -54, 49,  -32, 17,  -2,
  -6,  30,  -44, 48,  -46, 42,  -36, 24,  -5,  -6,  13,  -16, 20,  -18, 17,
  -19, 26,  -30, 25,  -16, 13,  -20, 16,  -7,  2,   -10, 7,   -8,  10,  -4,
  10,  -2,  22,  -18, 10,  -14, 12,  -9,  0,   4,   -26, 28,  -22, 26,  -22,
  16,  -4,  -7,  28,  -36, 35,  -40, 43,  -41, 25,  -8,  -12, 14,  -12, 16,
  -22, 28,  -20, 9
};

// non-separable secondary transforms
static const int32_t nsst8x8_mode1[256] = {
  71,  82,  48,  26,  -19, -16, -8,  -10, -15, -18, -14, -5,  -3,  -7,  -6,
  3,   54,  14,  -42, -82, 2,   -32, 14,  40,  20,  -2,  37,  8,   -8,  -12,
  1,   -8,  -27, -14, 72,  12,  18,  -63, -26, 46,  32,  10,  30,  -6,  -14,
  -6,  -2,  -26, 5,   1,   20,  4,   62,  52,  54,  50,  -16, -32, -13, -18,
  -24, -26, -23, -18, 11,  -20, -26, 30,  -8,  -35, 0,   24,  -56, -21, -13,
  64,  -4,  32,  -36, -47, -30, 24,  -4,  -18, 39,  -4,  -40, -51, -22, -26,
  34,  41,  -29, -58, -23, 6,   -46, 25,  6,   -6,  -36, -25, 48,  30,  -10,
  -2,  -12, 28,  -42, 3,   -4,  76,  -52, 74,  -1,  -11, 1,   24,  15,  18,
  8,   24,  15,  30,  57,  16,  5,   -40, 16,  24,  -28, 32,  44,  7,   -6,
  -7,  38,  63,  11,  6,   -46, 44,  -44, 14,  3,   2,   32,  -52, 34,  22,
  -50, 16,  -50, 18,  -25, 12,  -15, 54,  36,  19,  5,   -8,  4,   -12, -24,
  4,   -8,  16,  -26, 84,  -45, 4,   -3,  -69, -21, -16, 4,   -24, 54,  -50,
  -34, 28,  14,  -30, 19,  -6,  5,   14,  8,   28,  -78, -4,  34,  -24, 16,
  33,  -12, 48,  -18, 36,  6,   10,  54,  57,  26,  -18, 12,  42,  19,  -18,
  21,  -4,  60,  -44, 52,  -36, 1,   20,  -20, 34,  54,  -4,  12,  26,  -4,
  0,   2,   6,   -2,  -12, 22,  -6,  -76, 30,  72,  -54, 16,  11,  -20, 12,
  -9,  8,   -23, 0,   19,  -14, -48, 38,  3,   -24, -28, -28, 58,  -4,  -59,
  48
};

static const int32_t nsst8x8_mode2[256] = {
  69,  2,   4,   -10, 83,  -6,  10,  -7,  60,  -8,  0,   -6,  27,  -3,  -2,
  7,   54,  -4,  18,  -35, 10,  -20, 18,  16,  -56, -26, -18, -2,  -82, 1,
  2,   8,   16,  -11, -20, -24, -48, -24, -14, 33,  22,  -78, 14,  -12, 32,
  -8,  44,  28,  8,   12,  33,  66,  1,   12,  34,  84,  10,  2,   20,  42,
  -8,  -8,  12,  3,   -38, 31,  30,  -6,  30,  18,  34,  -32, -14, -42, 32,
  10,  4,   72,  29,  22,  57,  26,  13,  0,   -44, 20,  32,  -30, -25, 55,
  14,  -13, 31,  -8,  41,  38,  -4,  -36, -8,  34,  22,  -62, 14,  -38, -44,
  -13, -4,  58,  32,  -30, 6,   21,  1,   4,   -16, -41, -14, -26, 56,  36,
  -12, 10,  13,  0,   40,  28,  -79, 12,  38,  -12, 62,  9,   -40, -22, -25,
  -30, 12,  -14, 42,  17,  6,   22,  -28, -60, 34,  13,  -21, 2,   4,   30,
  -67, 22,  -34, 2,   -36, 48,  30,  56,  -7,  8,   -1,  -22, 2,   -20, 32,
  26,  10,  27,  -58, -5,  17,  -28, 47,  -18, 31,  -70, -26, 18,  72,  -58,
  -4,  9,   0,   6,   12,  1,   -54, 39,  24,  -38, 4,   6,   -2,  68,  -10,
  -14, 17,  8,   -39, -1,  -23, -14, 66,  12,  -4,  -56, -29, 16,  -16, -27,
  56,  11,  22,  -32, -48, 27,  -20, 24,  14,  -58, 12,  13,  -6,  52,  -11,
  40,  -16, -28, 8,   -76, -12, 22,  13,  48,  12,  16,  -9,  25,  50,  -30,
  5,   72,  9,   48,  -5,  -32, 9,   -6,  -16, -32, -56, -47, 20,  -2,  -14,
  -22
};

static const int32_t nsst8x8_mode3[256] = {
  111, -32, -2,  1,   -51, -1,  10,  -2,  -6,  14,  -2,  -2,  -6,  0,   -6,
  0,   44,  69,  -22, 4,   54,  -54, -12, 5,   -42, -11, 29,  -4,  -8,  16,
  -4,  -12, 28,  24,  29,  4,   18,  60,  -48, -18, -4,  -62, -36, 29,  -16,
  -16, 32,  2,   13,  28,  -2,  6,   38,  23,  44,  -18, -4,  26,  -56, -46,
  -2,  -44, -35, 46,  19,  -22, -24, -31, 53,  8,   -46, -2,  69,  40,  26,
  14,  -37, -12, -10, 14,  9,   12,  12,  22,  10,  34,  64,  35,  44,  -46,
  38,  -6,  -38, 13,  -30, -27, 0,   27,  -35, 2,   -18, 8,   12,  -88, 37,
  -1,  10,  -41, 2,   14,  38,  -37, 6,   12,  -50, 2,   6,   76,  -14, 42,
  -22, 28,  26,  -18, 56,  0,   8,   -20, 6,   21,  22,  30,  -10, 8,   -16,
  10,  26,  6,   13,  -26, 12,  74,  21,  80,  8,   -25, -13, 60,  24,  -28,
  -28, 27,  36,  -8,  -62, -25, 24,  20,  -8,  -46, 10,  -24, 78,  -40, 28,
  0,   -15, 0,   -7,  -2,  26,  -72, 24,  -2,  4,   -26, 2,   -27, 19,  61,
  24,  11,  -6,  -60, -12, 0,   44,  32,  40,  -6,  -49, 6,   -9,  -8,  22,
  18,  13,  32,  1,   -14, -44, 60,  -18, 6,   -64, 52,  0,   -36, 14,  4,
  8,   -59, 28,  5,   38,  -14, 16,  0,   -34, 50,  52,  58,  -14, -11, 12,
  -10, 24,  32,  36,  -10, 46,  13,  10,  31,  10,  28,  14,  -30, 89,  0,
  -2,  -72, -50, -10, 40,  4,   20,  -10, -38, -48, 2,   -23, -17, 24,  22,
  29
};

static const int32_t nsst8x8_mode4[256] = {
  116, -34, -16, -4,  -16, 30,  -6,  -2,  -14, 7,   11,  -2,  -1,  -2,  2,
  2,   8,   63,  -18, -8,  -78, 10,  50,  0,   6,   -50, 9,   18,  8,   -3,
  -19, 1,   36,  12,  15,  -14, 4,   -74, 20,  38,  16,  10,  -66, 12,  -8,
  34,  0,   -31, 2,   36,  26,  -12, -52, -6,  -46, 20,  -1,  27,  -5,  -70,
  18,  -16, 54,  6,   22,  54,  38,  12,  46,  18,  -46, 43,  -8,  -42, 20,
  -11, 1,   7,   -47, -18, -25, -11, -14, -40, -8,  73,  6,   68,  -20, 24,
  -29, 20,  14,  36,  4,   -5,  -6,  -12, 42,  16,  -13, -8,  20,  -10, -110,
  -10, -29, 0,   2,   -22, -9,  -2,  2,   -30, 60,  -61, 19,  4,   54,  11,
  19,  -40, 28,  -30, -17, -6,  24,  14,  -16, -36, -22, 7,   -38, -42, -20,
  44,  -27, -12, 64,  -7,  -45, 40,  -7,  -10, -8,  -30, 24,  15,  -30, 10,
  -11, 38,  33,  6,   -8,  30,  -28, -86, -15, -40, 6,   14,  39,  20,  -2,
  -6,  48,  12,  4,   80,  54,  2,   36,  8,   -32, -6,  -4,  -39, -6,  -11,
  -6,  -27, -18, 10,  2,   -36, 15,  14,  106, -7,  4,   -22, -1,  17,  22,
  -23, -4,  16,  -14, -48, -10, 6,   23,  32,  -13, 26,  40,  -90, -11, -23,
  -4,  -44, -24, 5,   -12, -38, 9,   10,  -22, -54, -1,  10,  -84, -30, -4,
  -32, 60,  59,  -38, 26,  -12, -15, 34,  -21, -24, 7,   3,   57,  -1,  17,
  4,   9,   34,  -58, -18, -20, -48, -16, -4,  18,  8,   66,  -5,  -1,  -19,
  58
};

static const int32_t nsst8x8_mode5[256] = {
  118, -19, -26, -2,  -26, 23,  1,   0,    -10, 2,   4,   2,   -4,  0,   3,
  0,   18,  90,  8,   -29, -28, -34, 59,   20,  7,   -18, -22, 16,  2,   4,
  -10, -6,  22,  -14, 80,  8,   -11, -32,  -33, 56,  18,  18,  -36, -36, -8,
  9,   22,  -10, -8,  49,  -16, 62,  -59,  6,   -46, -16, 18,  -30, 26,  -42,
  -4,  -4,  14,  7,   0,   -24, 5,   79,   -11, -24, 14,  -3,  -27, -21, -38,
  42,  1,   -4,  -46, -46, 20,  18,  85,   -1,  19,  20,  4,   -49, -6,  -10,
  48,  5,   -4,  -40, -35, 0,   -24, 3,    16,  -16, -38, 71,  8,   32,  -76,
  -12, -22, -8,  2,   -28, 19,  -10, 14,   10,  5,   1,   60,  29,  -10, 9,
  -3,  -84, -20, -26, 16,  53,  -10, 2,    -1,  -10, -22, 3,   8,   -1,  8,
  74,  16,  -6,  35,  -32, 22,  -46, -68,  14,  4,   8,   8,   60,  28,  36,
  69,  0,   21,  39,  -6,  -27, 40,  0,    36,  14,  -4,  0,   -5,  14,  17,
  34,  24,  24,  40,  -12, 6,   11,  -105, -12, 12,  -20, 5,   26,  2,   12,
  20,  11,  -30, 47,  3,   4,   55,  66,   34,  10,  38,  -42, 1,   30,  -18,
  -18, 15,  30,  -24, -18, 15,  47,  -23,  -38, 7,   6,   -36, -84, -14, -31,
  18,  -8,  -48, 8,   39,  6,   -2,  4,    54,  -17, -3,  81,  -22, -22, -8,
  -38, 8,   -26, -36, 20,  12,  -14, 74,   -46, -18, 14,  41,  -32, 18,  -30,
  -4,  15,  14,  7,   -21, 54,  -28, 9,    34,  28,  -33, 50,  4,   32,  -48,
  54
};

static const int32_t nsst8x8_mode6[256] = {
  106, -42, -4,  1,   42,  4,    -18, 2,   -22, 20,  1,   -8,  -22, 2,   4,
  0,   52,  2,   -18, -3,  -94,  21,  18,  -7,  32,  -32, -12, 19,  -8,  32,
  10,  8,   15,  -6,  2,   -8,   -34, 38,  0,   4,   -58, -16, 30,  -6,  62,
  -66, -28, -5,  -12, 36,  -3,   17,  -24, 40,  4,   -19, -49, 52,  23,  8,
  -62, -12, 48,  8,   6,   0,    13,  -1,  17,  -35, 44,  -26, -2,  -63, 58,
  21,  -48, -28, -14, 32,  21,   75,  -45, 6,   50,  37,  22,  -16, 1,   -16,
  10,  -2,  40,  34,  1,   23,   -17, -52, 39,  26,  20,  66,  -15, -35, 42,
  -10, 24,  14,  22,  6,   34,   26,  -22, -14, -8,  -26, -1,  46,  -34, 22,
  -20, -22, 36,  -28, -40, 57,   -58, -8,  25,  52,  37,  12,  -18, -13, -48,
  0,   56,  27,  40,  -40, -2,   -24, -26, 16,  6,   8,   32,  24,  6,   18,
  38,  28,  0,   -43, -12, -82,  -13, -5,  39,  -40, 8,   7,   73,  -56, -8,
  -18, 32,  -28, -30, 26,  6,    -14, 28,  50,  6,   18,  12,  22,  36,  -16,
  18,  42,  40,  5,   30,  20,   -14, 50,  -20, -18, -43, -62, 4,   36,  40,
  -24, 10,  14,  -60, 2,   -22,  -54, -60, 26,  -18, -16, 14,  23,  -3,  -4,
  -18, 1,   -4,  -3,  -13, -108, -3,  -8,  -28, -36, -10, -9,  -24, -36, -4,
  -5,  -34, -99, 9,   13,  -4,   2,   36,  2,   17,  -18, -7,  -33, 44,  -8,
  -6,  -15, -6,  -7,  0,   28,   41,  6,   12,  24,  -53, -34, -20, -28, -40,
  78
};

static const int32_t nsst8x8_mode7[256] = {
  94,  -44, -1,  -6,  -67, 21,  11,  0,   12,  14,  -10, -2,  -2,  -8,  -4,
  5,   74,  -5,  -12, -3,  83,  -53, 0,   0,   -25, -3,  15,  -4,  0,   10,
  -6,  -6,  15,  -9,  7,   -2,  39,  32,  -24, -2,  85,  -60, -19, 16,  -14,
  -22, 28,  -2,  4,   -5,  -2,  2,   -28, -2,  -14, 10,  -50, -58, 30,  26,
  -60, 34,  54,  -12, -14, -59, 27,  -16, 38,  40,  14,  -40, -37, 24,  -34,
  18,  8,   14,  42,  38,  -17, -58, 54,  25,  12,  0,   38,  33,  30,  2,
  56,  -4,  -12, 34,  -31, -12, -8,  -26, 16,  -28, -4,  2,   6,   -44, -20,
  -32, 21,  -60, 27,  -42, 12,  -67, -4,  -24, 16,  54,  3,   -13, 2,   36,
  -34, -6,  -30, 54,  10,  -73, -6,  -28, -8,  -1,  28,  1,   -18, -62, 24,
  -64, 20,  -10, -53, 20,  -40, 20,  -26, -18, -12, -32, 4,   -36, 6,   -5,
  -76, -2,  -2,  36,  17,  -2,  -62, -36, -36, 8,   10,  36,  14,  30,  3,
  -1,  40,  -40, 14,  34,  52,  0,   -39, -54, 39,  26,  23,  46,  85,  -34,
  -8,  7,   -32, -6,  -6,  5,   20,  45,  38,  8,   -2,  -8,  -7,  -27, 4,
  46,  -18, -53, -59, -11, 26,  26,  8,   -14, 38,  18,  57,  1,   2,   -10,
  -33, 44,  -2,  28,  -24, -67, -10, -28, 41,  36,  26,  10,  -52, 13,  19,
  28,  42,  65,  12,  40,  -29, -2,  -23, 0,   -34, -61, -28, 16,  -16, -5,
  -4,  -8,  29,  -6,  -16, -36, 1,   10,  -14, -58, 1,   -32, 16,  -28, -16,
  90
};

static const int32_t nsst8x8_mode8[256] = {
  108, -40, -8,  2,   -52, 8,   9,   -2,  -6,  9,   0,   -2,  -4,  1,   -2,
  0,   40,  94,  -34, -6,  2,   -58, -14, 14,  -11, -8,  26,  5,   -1,  4,
  0,   -10, 22,  32,  77,  -20, -4,  28,  -59, -36, -6,  -32, -23, 33,  2,
  4,   16,  7,   24,  15,  10,  38,  56,  -6,  46,  -52, -44, -8,  -36, -37,
  -4,  2,   -12, 36,  10,  -22, -1,  -91, 36,  4,   -18, 22,  -36, -10, 24,
  -34, 2,   10,  -36, 31,  22,  10,  54,  38,  33,  24,  2,   48,  28,  -8,
  38,  -42, -30, 10,  -28, -40, 18,  10,  -61, -14, 38,  56,  -17, -24, 41,
  -16, -12, 7,   -49, -44, 0,   -8,  -2,  32,  -14, 11,  -14, 71,  12,  -2,
  -34, 12,  22,  8,   72,  -22, -40, -20, -10, -24, -26, 40,  -14, -13, -52,
  -50, 16,  -46, 52,  -23, 14,  26,  -31, 21,  4,   -28, 0,   31,  21,  -24,
  -59, 25,  -42, 4,   -6,  -20, 18,  -77, 28,  -12, -4,  26,  24,  -20, -29,
  6,   21,  -22, 40,  18,  38,  -58, 12,  -48, 41,  46,  11,  -6,  21,  13,
  19,  -28, 2,   11,  38,  24,  6,   57,  10,  -42, -65, 54,  14,  -3,  -3,
  -20, 15,  -26, -8,  -6,  60,  -8,  -59, -38, 67,  4,   -18, -36, -2,  0,
  8,   -12, 10,  -11, -29, -58, -6,  96,  16,  -9,  -20, 11,  -18, -38, -12,
  -11, 22,  -27, -22, -33, 41,  -39, -16, -47, 16,  9,   -20, -52, -31, -57,
  -23, 26,  -2,  8,   -63, 6,   -24, 18,  -13, 6,   -56, -42, -42, -12, -55,
  18
};

static const int32_t nsst8x8_mode9[256] = {
  112, -38, -14, -4,  -40, 7,   8,   0,   -14, 10,  2,   -2,  -2,  0,   0,
  2,   40,  38,  -26, -6,  90,  -14, -31, 0,   -42, -19, 18,  8,   -24, -1,
  16,  2,   7,   92,  -38, -14, -58, -18, 16,  8,   -5,  -30, 22,  15,  23,
  6,   -10, -8,  14,  34,  16,  -18, -6,  76,  -15, -32, 28,  -32, -42, 2,
  -24, -42, 15,  36,  -18, 1,   -82, 32,  -10, 6,   -18, -26, -8,  42,  -5,
  -54, 8,   -9,  15,  46,  6,   28,  42,  24,  -28, 2,   -39, 31,  -3,  9,
  10,  -66, -36, 12,  50,  -38, 3,   5,   16,  -38, -9,  -46, 10,  -62, 40,
  18,  46,  -4,  -58, 16,  8,   30,  -17, 7,   -24, -32, -15, 2,   26,  44,
  -30, 52,  -36, 34,  -71, -16, 8,   -6,  12,  26,  4,   26,  0,   6,   -34,
  -24, 7,   26,  -50, 12,  -18, 74,  -60, -9,  -7,  -16, -26, 4,   -2,  -22,
  45,  -50, -16, -52, -54, -21, -17, 19,  34,  -48, 12,  -8,  -34, -28, 23,
  -6,  11,  64,  76,  -30, -16, -35, -11, 30,  -8,  16,  26,  42,  22,  32,
  35,  0,   68,  -4,  34,  55,  -17, 2,   32,  0,   35,  -2,  6,   6,   -14,
  -56, 12,  -8,  -30, -23, 27,  37,  -13, -24, 26,  -47, -25, -70, -2,  12,
  35,  -64, 6,   6,   28,  1,   -57, 7,   -16, -58, 28,  27,  -18, 37,  -7,
  -11, -12, -46, -8,  18,  -37, -4,  6,   16,  -4,  41,  39,  56,  75,  0,
  -10, -4,  -24, -4,  12,  83,  36,  -11, -3,  7,   62,  -10, -18, 32,  -16,
  -40
};

static const int32_t nsst8x8_mode10[256] = {
  114, -28, -13, 0,   -44, 8,   7,   0,   -21, 9,   4,   -2,  -3,  -1,  0,
  1,   34,  62,  -40, -2,  69,  -24, -20, 4,   -38, -28, 23,  2,   -30, 4,
  18,  -4,  -1,  92,  -13, -22, -68, 13,  14,  8,   18,  -25, -1,  10,  26,
  -15, -10, 2,   20,  20,  58,  -12, 26,  48,  -4,  -36, -8,  -17, -66, 0,
  -25, -22, 4,   44,  4,   -18, -38, -62, 37,  34,  53,  -6,  36,  1,   18,
  18,  -19, -32, -44, -10, 2,   -11, -23, 37,  24,  8,   17,  3,   -33, -26,
  -36, 64,  72,  4,   -31, 1,   -3,  -30, -3,  4,   -15, -14, -2,  -50, 26,
  -78, 48,  21,  -1,  2,   23,  48,  7,   -6,  22,  -50, 10,  36,  -80, -5,
  2,   8,   30,  30,  44,  -12, 20,  -33, -10, -8,  -1,  -14, -22, -41, -55,
  5,   -26, 2,   -2,  18,  -32, -29, -83, 32,  7,   -9,  10,  -38, 21,  -40,
  16,  40,  -8,  4,   3,   -40, 59,  -45, 20,  56,  3,   -2,  0,   62,  9,
  52,  -18, 26,  8,   -34, 29,  -54, 6,   -52, -30, -12, -2,  8,   28,  31,
  -5,  -26, 26,  -16, -10, 28,  22,  52,  -18, -84, 32,  -22, -39, -18, -24,
  -20, -29, 52,  14,  25,  -84, -6,  15,  6,   -24, -4,  30,  22,  11,  2,
  3,   20,  7,   18,  -14, 82,  50,  9,   3,   53,  -28, 14,  18,  45,  -9,
  -16, -80, 4,   -12, -4,  -38, -14, 28,  2,   -62, -8,  -6,  -40, 40,  0,
  2,   -24, 29,  -28, -9,  -28, 7,   48,  -2,  -74, -35, 3,   -22, -8,  10,
  -60
};

static const int32_t nsst8x8_mode11[256] = {
  112, -46, -18, -5,  -28, 10,  4,   -2,  -18, 10,  4,   -2,  -2,  0,   -2,
  2,   30,  36,  -26, -10, 95,  -16, -32, -8,  -38, -18, 21,  11,  -23, 1,
  13,  -1,  0,   62,  -32, -8,  -63, -17, 18,  16,  -53, -36, 40,  19,  17,
  10,  -8,  -9,  -2,  19,  4,   1,   -22, 76,  -17, -34, -14, -32, -22, 19,
  -36, -50, 22,  43,  -3,  18,  5,   16,  -22, -47, -8,  28,  -32, 67,  -16,
  -20, -42, -30, 51,  25,  18,  22,  88,  -38, -10, 14,  -14, 12,  -6,  -2,
  2,   11,  -31, 18,  16,  -64, 2,   -8,  32,  -22, 14,  -21, 14,  20,  -16,
  23,  -2,  74,  12,  -52, -61, 26,  -18, -22, -36, -24, -12, 20,  -78, 64,
  -16, -6,  -25, -16, 4,   -18, -28, -26, 4,   0,   4,   98,  -5,  1,   -16,
  -9,  2,   0,   26,  8,   -36, -24, -39, -47, -9,  4,   2,   6,   -8,  -4,
  -18, -59, -58, 28,  -63, 2,   2,   52,  -41, -2,  4,   24,  7,   -37, 3,
  3,   22,  -16, 2,   7,   22,  -84, -32, -29, -64, 10,  -16, -22, -10, -31,
  -16, -19, -38, -72, -4,  26,  44,  4,   31,  -44, 22,  -34, 22,  63,  -7,
  14,  14,  54,  3,   10,  16,  62,  -9,  -6,  62,  -12, 1,   -18, 9,   -2,
  10,  12,  13,  -27, 36,  -2,  -26, -48, -62, -28, 36,  -56, 16,  -40, 13,
  1,   62,  32,  -2,  -13, -52, 5,   -18, -24, 25,  -32, 54,  6,   -2,  54,
  -32, -49, 10,  8,   24,  50,  40,  19,  -74, 18,  38,  -14, 8,   4,   13,
  -8
};

static const int32_t nsst8x8_mode12[256] = {
  104, -46, -4,  -3,  -48, 10,  8,   4,   -20, 21,  -6,  2,   -1,  -1,  -5,
  2,   19,  51,  -62, 42,  -44, -6,  9,   -2,  50,  -31, 35,  -28, 10,  4,
  2,   -8,  -30, -35, 47,  -2,  -59, 48,  -18, -2,  70,  -9,  -23, -4,  16,
  -14, 4,   4,   -18, 41,  -6,  6,   -33, -8,  46,  -16, -22, 52,  -48, -11,
  28,  -46, -22, 43,  20,  19,  48,  68,  5,   -41, -47, -37, 0,   26,  -10,
  9,   28,  9,   38,  -12, 18,  9,   -34, 34,  38,  47,  -34, 31,  2,   -16,
  -73, -14, -24, -22, 26,  16,  1,   -16, -12, 18,  20,  41,  -22, -31, -34,
  -40, 16,  6,   80,  3,   -46, 24,  -3,  -9,  0,   -4,  12,  -4,  16,  56,
  -8,  10,  -2,  -28, 65,  -35, 19,  -77, -14, -52, 15,  62,  17,  -22, 33,
  42,  6,   8,   15,  -52, -6,  24,  -17, 43,  32,  -7,  -6,  -36, 52,  -23,
  -16, -4,  62,  24,  30,  -4,  22,  -52, 5,   45,  12,  12,  32,  22,  28,
  56,  24,  -48, -3,  16,  34,  -44, -40, -38, -17, -35, -33, -20, -38, -12,
  -30, 16,  -60, -4,  -38, 46,  40,  -42, -4,  -7,  38,  16,  -24, -43, -29,
  45,  -12, -24, -9,  -2,  -4,  -4,  13,  59,  -27, -70, -24, -20, -10, -30,
  -31, 14,  18,  30,  62,  -36, 11,  16,  4,   36,  19,  20,  74,  4,   9,
  35,  46,  10,  -16, 23,  12,  48,  -31, -32, 47,  30,  -2,  -34, 42,  42,
  0,   26,  -6,  19,  10,  44,  -14, 44,  22,  72,  21,  49,  5,   34,  -38,
  -8
};

static const int32_t nsst4x8_mode0[64] = {
  106, -40, -52, -4, -19, 20, 2,   3,   30,  13,  84,  -44, -74, -2,  -14, 28,
  -26, -82, 32,  52, -18, 52, -42, -16, 23,  2,   18,  93,  -18, -77, 15,  21,
  -5,  -45, 30,  -8, 22,  20, 108, 31,  -13, -61, -2,  -46, -16, -75, 6,   -66,
  -19, 34,  -28, 26, -80, 32, 50,  -58, -48, -28, -60, -16, -52, -16, -8,  80
};

static const int32_t nsst4x8_mode1[64] = {
  84,  86,  -16, -24, -25, -17, -6,  -3,  43,  -20,  72,  73,  -40,
  14,  -30, -28, -12, 13,  58,  -19, -32, 4,   7,    106, -74, 58,
  30,  -28, -52, 21,  -12, -52, -4,  -6,  28,  -38,  40,  -49, -100,
  -2,  1,   34,  70,  2,   76,  -23, 59,  -22, 34,   -62, 30,  -84,
  -36, -9,  33,  -32, -22, -4,  -10, 30,  -42, -112, 24,  -2
};

static const int32_t nsst4x8_mode2[64] = {
  102, -30, -3, -7, -66, 25,  -4,  4,   -19, 24,  100, -32, -44, -16, -41, 22,
  -18, -44, 30, 62, 7,   56,  -53, -60, 1,   56,  12,  38,  -47, -29, 52,  -77,
  35,  79,  12, 61, 30,  41,  -10, 50,  42,  26,  -22, -7,  32,  -68, -80, -37,
  48,  -28, 68, -8, 75,  -16, 50,  -18, -4,  -46, 7,   80,  -19, -72, 4,   48
};

static const int32_t nsst4x8_mode3[64] = {
  112, -22,  -53, -6,  -12, 14,  -6,  -2,  38,  42,  76,   -46, -62,
  -22, -12,  26,  -16, -22, 3,   -34, -52, 38,  -4,  -102, 8,   -81,
  58,  59,   -16, 20,  -46, 15,  -6,  -16, -5,  -70, 53,   -11, -91,
  0,   4,    66,  -20, 67,  -18, -23, -70, -35, -18, -48,  -32, -6,
  -44, -104, 3,   -2,  40,  -1,  54,  14,  66,  -50, 28,   -62
};

static const int32_t nsst4x8_mode4[64] = {
  108, -1,  -63, 12,  -16, -18, 10, -2,  -53, 24,  -84, -24, 32,  -53, 32, 22,
  2,   -46, 29,  -30, -60, -44, 28, 78,  -6,  88,  9,   -34, -78, -12, 3,  -32,
  40,  58,  41,  -45, 65,  15,  26, 50,  -16, 5,   -38, 14,  -32, 98,  50, 36,
  0,   5,   34,  58,  7,   -30, 98, -34, 6,   -49, -3,  -90, 6,   18,  40, -62
};

static const int32_t nsst4x8_mode5[64] = {
  114, -22, -36, 29,  -26, -6,  1,   3,   -20, 10, -58, 66,  70,  -58, -2,   -6,
  14,  16,  5,   32,  55,  102, -14, -36, 29,  -6, -6,  -66, 75,  2,   -9,   74,
  -1,  -86, 74,  48,  24,  -9,  13,  21,  12,  76, 36,  41,  -6,  4,   67,   56,
  41,  36,  62,  -28, 37,  -50, 2,   -70, 5,   36, 33,  32,  -15, -12, -107, 34
};

static const int32_t nsst4x8_mode6[64] = {
  115, -32, -24, 5,   -37, 12, 1,   1,   -3,  0,    -103, 34,  54,
  -22, 34,  -3,  0,   -22, 22, 28,  29,  66,  26,   -94,  -19, 55,
  -35, -22, -69, 55,  60,  6,  -10, -38, -25, -102, -7,   -34, 9,
  -50, 22,  58,  -26, -42, 44, 52,  -74, -4,  -46,  -64,  -45, 22,
  -48, 36,  -63, 4,   3,   54, -12, 36,  -48, -58,  -38,  -70
};

static const int32_t nsst4x8_mode7[64] = {
  102, -45, -55, 8,   -10, 21,  8,   -12, 38,  0,   72,  -50, -76, 10,  -10, 36,
  -16, -4,  -20, -54, -24, 2,   -68, -88, -16, -34, -43, 10,  -38, -88, -41, 48,
  10,  0,   -12, -48, 70,  32,  -64, 62,  -49, -90, 12,  32,  -19, 63,  -16, 9,
  10,  -70, 50,  -38, 54,  -54, 29,  -26, 36,  10,  57,  77,  19,  -16, -69, -19
};

static const int32_t nsst4x8_mode8[64] = {
  114, -22, -45, -14, -14, 17,  -1,  5,   26,  71,  60,  -53, -50,
  -20, -16, 31,  -1,  -48, 36,  67,  -80, 17,  6,   38,  -14, 66,
  -72, 44,  -4,  4,   -17, 66,  -18, -36, -34, -20, -36, -62, -88,
  -14, 4,   18,  22,  16,  11,  88,  -82, -29, -44, -28, -36, -78,
  -35, 62,  18,  31,  9,   -42, 34,  -14, 68,  -6,  -32, 88
};

static const int32_t nsst4x8_mode9[64] = {
  106, -51, -34, -6,  -28,  20,  -4,  2,   12,  4,   94,  -46, -66,
  -4,  -12, 30,  -56, -66,  -13, -39, -20, 67,  -32, -34, -4,  64,
  -30, 29,  -84, 30,  18,   -46, 13,  40,  -23, -26, 4,   -29, -111,
  -16, 10,  28,  -25, -104, 17,  -16, 50,  -32, -13, -52, 4,   14,
  -35, -92, 6,   -60, -35,  -11, -65, -18, -47, -32, 4,   85
};

static const int32_t nsst4x8_mode10[64] = {
  116, -28, -28, 4,   -34, 4,   -11, -2,  16,  60, 56,  10,  -46, -84, -14, 2,
  10,  63,  29,  27,  -25, 82,  -2,  -58, -20, 6,  -60, 84,  -34, -22, 61,  -6,
  -2,  -28, -8,  37,  44,  -38, -54, -88, 28,  70, -34, 31,  76,  0,   -24, 46,
  10,  44,  -48, -76, 14,  -26, 50,  -54, -36, 20, -66, -21, -58, 6,   -80, 9
};

static const int32_t nsst4x8_mode11[64] = {
  111, -42, -27, 0,   -38, 12,  -3,  2,   6,  8,   98,  -30, -66, -20, -23, 22,
  -18, 8,   -17, -56, -32, 58,  -40, -81, 47, 43,  62,  38,  60,  50,  -4,  -31,
  37,  77,  -17, -60, 12,  -59, 36,  -20, 8,  61,  -36, 38,  -16, -13, -93, 30,
  6,   -48, 18,  14,  33,  -78, -47, -65, 9,  -26, 4,   -76, 67,  16,  -46, 54
};

static const int32_t nsst4x8_mode12[64] = {
  100, -35, 5,   2,   -64,  18,  -26, 8,   44,  -15, -60, 38,  64,
  39,  46,  -37, 3,   -36,  70,  -14, 62,  66,  -20, 40,  -14, -12,
  -45, 24,  26,  -2,  -112, -14, 39,  33,  -44, -60, 40,  -32, -2,
  75,  36,  78,  45,  76,   20,  -22, -11, 15,  22,  -62, 34,  2,
  40,  -93, 5,   -24, -30,  -50, -26, 68,  -18, -10, 20,  82
};

static const int32_t nsst8x4_mode0[64] = {
  108, -49, -22, 1,   -40, 4,  14,  6,   39, 79,  -59, -10, 30,  -61, -18, 12,
  48,  46,  57,  -38, 26,  58, -40, -43, 16, -61, 9,   28,  100, -24, -30, -4,
  -18, -22, -78, -56, 24,  68, -20, 26,  -6, 3,   -22, 70,  -39, 18,  -96, -4,
  16,  38,  -10, 76,  32,  62, 55,  28,  9,  5,   48,  -16, -2,  -4,  -28, 114
};

static const int32_t nsst8x4_mode1[64] = {
  79, -2,  -88, -18, 10,  -10, 43, -4,  9,  80,  16,  -87, 12,  -10, -19, 38,
  -8, 11,  26,  -10, -92, -8,  82, 13,  73, 20,  19,  22,  -64, 33,  -64, -23,
  66, -34, 72,  14,  33,  -50, 15, 43,  16, 60,  27,  44,  48,  70,  52,  -10,
  14, -54, 36,  -76, 12,  48,  17, -60, -1, -42, -16, -8,  -10, 74,  -8,  93
};

static const int32_t nsst8x4_mode2[64] = {
  89,  -28, -18, -14, 79,  -20, -22, 8,  68,  -21, 16,   54,  -54,
  -5,  47,  -54, 28,  70,  -26, 2,   4,  86,  -32, -38,  -36, 42,
  25,  51,  70,  -40, 14,  -58, -8,  0,  -48, -80, -14,  -38, 12,
  -76, 0,   -30, 100, -52, 15,  38,  -7, -33, 38,  86,   38,  -38,
  -14, -38, 38,  39,  11,  12,  24,  14, -41, -51, -104, -14
};

static const int32_t nsst8x4_mode3[64] = {
  109, -52, -14, 2,    -38, -4, 14,  0,   38,  86, -50, -8,  9,   -60, -20, 33,
  31,  43,  68,  -28,  -24, 31, -74, -34, 32,  16, 31,  36,  76,  -27, 34,  -72,
  10,  -22, -4,  -110, 59,  2,  8,   8,   24,  56, 14,  4,   6,   80,  68,  38,
  -16, 28,  -48, -38,  -54, 6,  40,  -84, -12, 8,  76,  -24, -44, -68, 54,  20
};

static const int32_t nsst8x4_mode4[64] = {
  111, -32, -28, 2,   -40, 22,  14,  3,   18, 108, -43, -32, -6,  -14, 34,  4,
  26,  2,   98,  -58, -10, -39, 30,  12,  -5, -21, -36, 10,  -28, -98, -19, 61,
  -10, -44, -46, -66, 16,  -36, 24,  -75, 42, 28,  24,  58,  32,  -54, -38, -67,
  -4,  18,  3,   -50, -57, 14,  -99, -18, 34, -4,  -12, -40, 96,  8,   -44, 44
};

static const int32_t nsst8x4_mode5[64] = {
  118, 10,  -33, -11, -32, -4,  6,   6,   -10, 108, 18,   -60, 5,
  -25, 7,   9,   32,  -18, 117, 2,   -5,  -13, -18, 28,   8,   60,
  0,   108, 6,   -16, -28, -2,  29,  14,  12,  -10, 82,   80,  -22,
  -38, 9,   -14, -26, 0,   78,  -32, 0,   92,  10,  -20,  -7,  -19,
  34,  -84, -57, -64, -12, 3,   -20, -22, -38, 32,  -106, 39
};

static const int32_t nsst8x4_mode6[64] = {
  113, -44, -24, -4,   -32, 8,   -2,  6,   -10, -27, 19,  -4,  -36,
  -91, 66,  36,  16,   -4,  -34, -4,  82,  -62, -52, 41,  -20, -105,
  58,  10,  30,  16,   -18, -10, -36, -20, -24, -11, -80, -18, -84,
  16,  15,  16,  14,   113, -10, -33, -20, -37, 8,   -2,  -2,  -50,
  5,   -49, -10, -106, 36,  46,  100, -28, -8,  -12, -38, 21
};

static const int32_t nsst8x4_mode7[64] = {
  108, -62, -10, 1,   -24, -6,  16,  4,   45, 62,  -52, -10, 62,  -53, -24, 22,
  42,  40,  34,  -31, 6,   78,  -62, -31, 2,  -37, 39,  9,   96,  -5,  28,  -60,
  -8,  -30, -40, 52,  46,  72,  -8,  62,  26, 66,  4,   76,  -18, 20,  62,  -29,
  16,  14,  96,  16,  10,  -23, -1,  76,  -3, -19, 6,   80,  -14, -38, -84, -30
};

static const int32_t nsst8x4_mode8[64] = {
  108, -46, 2,   -4,   -46, 7,   18,  -10, 38, 85,  -64, -15, -14, -52, -3, 20,
  26,  42,  57,  -42,  -2,  28,  -90, -16, 20, 49,  50,  38,  30,  -18, 50, -77,
  -14, -6,  30,  -108, 0,   -30, 52,  0,   32, 26,  -16, -16, 69,  82,  36, 36,
  19,  -44, -47, -22,  79,  -34, -38, -50, 27, -12, 57,  26,  46,  -60, -8, 76
};

static const int32_t nsst8x4_mode9[64] = {
  104, -58, -15, 0,   -38, 6,   18,  11,  33,  71,  -80, -12, 7,
  -53, -10, 26,  54,  56,  52,  -47, 13,  34,  -51, -36, 26,  -28,
  -8,  9,   106, -26, 24,  -48, -6,  -3,  -28, -50, 46,  78,  25,
  66,  -28, -53, -48, -78, -14, -10, -48, -42, -4,  7,   47,  -74,
  -12, -58, 70,  12,  5,   -34, 38,  0,   30,  -48, -69, 76
};

static const int32_t nsst8x4_mode10[64] = {
  108, -38, -36, 4,   -42, -6,  14,  2,   -4,  68,  -76,  2,   4,
  -73, 1,   24,  44,  82,  26,  -64, -8,  42,  -31, -6,   37,  19,
  18,  38,  66,  -28, 0,   -88, -35, 11,  -57, 15,  -61,  44,  -9,
  -76, -12, -28, 34,  -48, -46, -76, -52, -34, -5,  -46,  -60, -78,
  64,  16,  -11, -16, 10,  -10, -18, 48,  18,  18,  -111, 26
};

static const int32_t nsst8x4_mode11[64] = {
  105, -58, -15, -2,  -38, 11, 14,  6,   52,  78,  -58, -21, 30,  -44, -25, 14,
  34,  17,  43,  -26, 51,  79, -50, -32, 6,   -48, -21, 34,  100, -24, 34,  -26,
  -28, -13, -94, 11,  0,   76, -7,  28,  -23, -63, -20, -62, 2,   -40, -78, -8,
  -5,  -4,  12,  -92, 26,  12, 64,  54,  8,   -14, 34,  42,  25,  -6,  -42, 104
};

static const int32_t nsst8x4_mode12[64] = {
  102, -8,  -64, -11, -32, -18, 15, 13,  20,  20,  -42,  -8,  98,
  18,  -58, -22, 52,  -88, 68,  10, 21,  20,  -14, -18,  36,  66,
  50,  -64, -24, 42,  -6,  -42, -6, -10, 6,   -38, 20,   -96, 24,
  -67, -30, -40, -54, 4,   -44, 46, -16, -82, -28, -48,  -18, -102,
  3,   13,  -7,  48,  0,   2,   12, 2,   -48, -45, -108, 12
};

static const int32_t nsst8x8_mode0[256] = {
  114, -35, -16, -3,  -34, 8,   8,   0,   -23, 9,   4,   -1,  -2,  1,   -3,
  0,   26,  14,  -16, 0,   104, -18, -28, -2,  -44, 2,   16,  -1,  -26, 6,
  14,  -4,  16,  100, -42, -14, -30, 5,   -2,  0,   -14, -44, 26,  16,  11,
  -8,  1,   -2,  24,  18,  -10, -2,  9,   -76, 18,  32,  66,  -4,  -26, 2,
  -6,  43,  2,   -35, -4,  -33, -60, 26,  24,  -10, 20,  -50, 22,  -32, 6,
  37,  42,  16,  -32, 38,  -9,  -20, -36, 68,  -2,  31,  -26, 42,  -10, -43,
  -12, -33, 10,  6,   -10, -56, 6,   19,  -8,  -10, 28,  28,  16,  34,  2,
  66,  -7,  19,  80,  -18, -24, -28, 16,  6,   62,  -14, 6,   -25, -32, -22,
  -12, -42, 0,   -46, 68,  18,  -27, 2,   -2,  -5,  -4,  -3,  10,  -26, 46,
  6,   10,  -4,  52,  -47, -22, -62, -61, -12, -7,  -18, -26, -14, -8,  -52,
  -10, -7,  -20, -12, -48, 0,   26,  -80, 47,  -10, -8,  -14, -19, -61, 9,
  12,  6,   64,  -21, -32, -48, -3,  -12, 10,  -42, 44,  -22, -7,  18,  23,
  -19, -44, 56,  16,  -82, 0,   12,  32,  9,   33,  -4,  -15, -20, -14, -32,
  -46, -24, -16, -50, -40, -18, 26,  -1,  12,  -18, 19,  -50, -57, -8,  -4,
  -20, 27,  -26, -44, -62, 45,  -2,  38,  42,  -6,  12,  2,   -6,  58,  -18,
  -18, -46, -44, -3,  6,   27,  -4,  -4,  10,  34,  -67, 24,  40,  54,  -2,
  -2,  -40, 20,  -38, 6,   6,   -16, 36,  21,  -42, 64,  58,  12,  -12, 24,
  -28
};

// pointers to non-separable mode-dependent transforms
static const int32_t *nstx_intra_mtx[4][INTRA_MODES] = {
  { mdt4x4_mode0, mdt4x4_mode1, mdt4x4_mode2, mdt4x4_mode3, mdt4x4_mode4,
    mdt4x4_mode5, mdt4x4_mode6, mdt4x4_mode7, mdt4x4_mode8, mdt4x4_mode9,
    mdt4x4_mode10, mdt4x4_mode11, mdt4x4_mode12 },
#if !CONFIG_MODE_DEP_NONSEP_SEC_INTRA_TX
  { mdt8x8_mode0, mdt8x8_mode1, mdt8x8_mode2, mdt8x8_mode3, mdt8x8_mode4,
    mdt8x8_mode5, mdt8x8_mode6, mdt8x8_mode7, mdt8x8_mode8, mdt8x8_mode9,
    mdt8x8_mode10, mdt8x8_mode11, mdt8x8_mode12 },
  { mdt4x8_mode0, mdt4x8_mode1, mdt4x8_mode2, mdt4x8_mode3, mdt4x8_mode4,
    mdt4x8_mode5, mdt4x8_mode6, mdt4x8_mode7, mdt4x8_mode8, mdt4x8_mode9,
    mdt4x8_mode10, mdt4x8_mode11, mdt4x8_mode12 },
  { mdt8x4_mode0, mdt8x4_mode1, mdt8x4_mode2, mdt8x4_mode3, mdt8x4_mode4,
    mdt8x4_mode5, mdt8x4_mode6, mdt8x4_mode7, mdt8x4_mode8, mdt8x4_mode9,
    mdt8x4_mode10, mdt8x4_mode11, mdt8x4_mode12 },
#else
  { nsst8x8_mode0, nsst8x8_mode1, nsst8x8_mode2, nsst8x8_mode3, nsst8x8_mode4,
    nsst8x8_mode5, nsst8x8_mode6, nsst8x8_mode7, nsst8x8_mode8, nsst8x8_mode9,
    nsst8x8_mode10, nsst8x8_mode11, nsst8x8_mode12 },
  { nsst4x8_mode0, nsst4x8_mode1, nsst4x8_mode2, nsst4x8_mode3, nsst4x8_mode4,
    nsst4x8_mode5, nsst4x8_mode6, nsst4x8_mode7, nsst4x8_mode8, nsst4x8_mode9,
    nsst4x8_mode10, nsst4x8_mode11, nsst4x8_mode12 },
  { nsst8x4_mode0, nsst8x4_mode1, nsst8x4_mode2, nsst8x4_mode3, nsst8x4_mode4,
    nsst8x4_mode5, nsst8x4_mode6, nsst8x4_mode7, nsst8x4_mode8, nsst8x4_mode9,
    nsst8x4_mode10, nsst8x4_mode11, nsst8x4_mode12 },
#endif  // !CONFIG_MODE_DEP_NONSEP_SEC_INTRA_TX
};

static INLINE const int32_t *nstx_arr(TX_SIZE tx_size, PREDICTION_MODE mode) {
  switch (tx_size) {
    case TX_4X4: return nstx_intra_mtx[0][mode];
    case TX_8X8: return nstx_intra_mtx[1][mode];
    case TX_4X8: return nstx_intra_mtx[2][mode];
    case TX_8X4: return nstx_intra_mtx[3][mode];
    default: assert(0); return NULL;
  }
}
#endif  // CONFIG_MODE_DEP_INTRA_TX && CONFIG_MODE_DEP_NONSEP_INTRA_TX

// pointers to separable mode-dependent transforms
static const int32_t *mdt_mtx_intra_arr4[INTRA_MODES] = {
  mdt4_mode0,  mdt4_mode1,  mdt4_mode2, mdt4_mode3, mdt4_mode4,
  mdt4_mode5,  mdt4_mode6,  mdt4_mode7, mdt4_mode8, mdt4_mode9,
  mdt4_mode10, mdt4_mode11, mdt4_mode12
};

static const int32_t *mdt_mtx_intra_arr8[INTRA_MODES] = {
  mdt8_mode0,  mdt8_mode1,  mdt8_mode2, mdt8_mode3, mdt8_mode4,
  mdt8_mode5,  mdt8_mode6,  mdt8_mode7, mdt8_mode8, mdt8_mode9,
  mdt8_mode10, mdt8_mode11, mdt8_mode12
};

#if MDTX_INTRA_16
static const int32_t *mdt_mtx_intra_arr16[INTRA_MODES] = {
  mdt16_mode0,  mdt16_mode1,  mdt16_mode2, mdt16_mode3, mdt16_mode4,
  mdt16_mode5,  mdt16_mode6,  mdt16_mode7, mdt16_mode8, mdt16_mode9,
  mdt16_mode10, mdt16_mode11, mdt16_mode12
};
#else
#if CONFIG_LGT
static const int32_t *mdt_mtx_intra_arr16[INTRA_MODES] = {
  lgt15_16, lgt15_16, lgt15_16, lgt15_16, lgt15_16, lgt15_16, lgt15_16,
  lgt15_16, lgt15_16, lgt15_16, lgt15_16, lgt15_16, lgt15_16
};
#else
static const int32_t *mdt_mtx_intra_arr16[INTRA_MODES] = {
  dst7_16, dst7_16, dst7_16, dst7_16, dst7_16, dst7_16, dst7_16,
  dst7_16, dst7_16, dst7_16, dst7_16, dst7_16, dst7_16
};
#endif  // CONFIG_LGT
#endif  // MDTX_INTRA_16

#if CONFIG_LGT
static const int32_t *mdt_mtx_inter_arr4[MODE_DEP_INTER_TX_MODES] = {
  lgt_klt4_inter,
  lgt_klt4_inter,
};

static const int32_t *mdt_mtx_inter_arr8[MODE_DEP_INTER_TX_MODES] = {
  lgt_klt8_inter,
  lgt_klt8_inter,
};

static const int32_t *mdt_mtx_inter_arr16[MODE_DEP_INTER_TX_MODES] = {
  lgt_klt16_inter,
  lgt_klt16_inter,
};
#else
static const int32_t *mdt_mtx_inter_arr4[MODE_DEP_INTER_TX_MODES] = {
  single_klt4_inter, comp_klt4_inter
};

static const int32_t *mdt_mtx_inter_arr8[MODE_DEP_INTER_TX_MODES] = {
  single_klt8_inter, comp_klt8_inter
};

static const int32_t *mdt_mtx_inter_arr16[MODE_DEP_INTER_TX_MODES] = {
  single_klt16_inter, comp_klt16_inter
};
#endif  // CONFIG_LGT

static INLINE const int32_t *get_mdt_from_mode_4(int mode) {
  if (is_intra_mode_dep_txfm_mode(mode)) {
    return mdt_mtx_intra_arr4[intra_mode_dep_txfm_mode(mode)];
  } else {
    return mdt_mtx_inter_arr4[inter_mode_dep_txfm_mode(mode)];
  }
}

static INLINE const int32_t *get_mdt_from_mode_8(int mode) {
  if (is_intra_mode_dep_txfm_mode(mode)) {
    return mdt_mtx_intra_arr8[intra_mode_dep_txfm_mode(mode)];
  } else {
    return mdt_mtx_inter_arr8[inter_mode_dep_txfm_mode(mode)];
  }
}

static INLINE const int32_t *get_mdt_from_mode_16(int mode) {
  if (is_intra_mode_dep_txfm_mode(mode)) {
    return mdt_mtx_intra_arr16[intra_mode_dep_txfm_mode(mode)];
  } else {
    return mdt_mtx_inter_arr16[inter_mode_dep_txfm_mode(mode)];
  }
}
#ifdef __cplusplus
}
#endif

#endif  // MDTX_BASES_H
